Unicode variable names: Difference between revisions

Haskell solution.
(Forth)
(Haskell solution.)
Line 90:
2
</pre>
 
=={{header|Haskell}}==
Haskell variables must start with a lower case character, however Δ is an upper case delta. As such, lower case delta (δ) was used instead.
 
Also, Haskell does not allow mutable variables, so incrementing delta isn't possible. Instead lower case psi was used to store the incremented value of delta since tridents are cool.
 
<lang Haskell>{-# OPTIONS -XUnicodeSyntax #-}
 
main = print ψ
where δ = 1
ψ = δ + 1
</lang>
 
=={{header|Java}}==
Anonymous user