Cure Playground

Live type-checking powered by the Cure bidirectional checker. Hit Run to evaluate in a sandboxed process.

OK -- no type errors
mod Demo
  fn add(a: Int, b: Int) -> Int = a + b

  fn doubled(xs: List(Int)) -> List(Int) =
    xs |> Std.List.map(fn (x) -> x * 2)

  fn main() -> Int = add(1, 2)