rust and haskell analogs
haskell | rust |
---|---|
typeclasses | traits |
Maybe (Just or Maybe) | Option (Some or None) |
Either (Right or Left) | Result (Ok or Err) |
case of | match |
record syntax constructors | structs |
algebraic data types | enum |
type parameters | generic data type |
type constraints on typeclasses | using trait bounds to conditionally implement methods |
monad | and_then() |