- keine list comprehensions
- nur
let
, keinwhere
- pattern-matching fast nur mit
case
, entsprechend nur eine Definitionsgleichung per Funktion - kein explizites Layout mit
{ ; }
Haskell | : |
:: |
[Int] |
type |
data |
newtype |
... |
---|---|---|---|---|---|---|---|
Elm | :: |
: |
List Int |
type alias |
type |
existiert nicht | ... |
String
s sind nicht Listen vonChar
sSet
s,Dict
s,Array
s- record types with subtyping
Haskell | id |
const |
. |
... |
---|---|---|---|---|
Elm | identity |
always |
<< |
... |
Keine Typklassen!
Aber Array.map
, Dict.map
, Json.Decode.map
, List.map
, Maybe.map
, ...
Und überladene Typen für einige spezifische Zwecke:
(+) : number -> number -> number
sort : List comparable -> List comparable
(++) : appendable -> appendable -> appendable
lexicographic : (comparable, comparable') -> (comparable, comparable') -> Bool
lexicographic (a,b) (x,y) = a < x || a == x && b <= y
Modul-import
per Default immer qualifizert. Explizite Abweichung mittels etwa import List exposing (map)
.
Keine IO
-Monade, da anderes Interaktionskonzept. Aber Task
-Typkonstruktor spielt eine ähnliche Rolle.
Strikte Auswertung!