Version 1 (modified by benl, 5 years ago) |
---|

# Disciple vs Haskell

Some basic differences between Disciple and Haskell

- Disciple uses strict / call-by-value as the default evaluation order. This implies that bindings in let and where expressions must be written in dependency order. For example, you can write:

fun :: Int -> Int fun x = x + z where y = g x z = 3 + y

but not:

fun :: Int -> Int fun x = x + z where z = 3 + y y = g x

This doesn't work because the bindings for

yandzare in the "wrong" order.

For a where expression, all the bindings are evaluated in-order, before moving to the body.

- We use
`(.)`for projection instead of function composition. If you want to compose two functions then use`($)`