¡Esta es una revisión vieja del documento!
type Dollar = Dollar Float priceInEuros: Dollar -> Float priceInEuros (Dollar d) = d * 1.1 priceInEuros 3.3 -- 3.63
Every function that accepts two arguments can be converted in one that accepts one argument:
> String.repeat <function> : Int -> String -> String > String.repeat 4 <function> : String -> String
type alias MyType = Int → String → String mytrial: MyType mytrial n s = String.repeat n s mytrial 3 “abc”