You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
446 B
Plaintext
18 lines
446 B
Plaintext
app "higher-order"
|
|
packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" }
|
|
imports [pf.Stdout, pf.Task]
|
|
provides [main] to pf
|
|
|
|
main : Task.Task {} I32
|
|
main =
|
|
mySum = bind anySum 2
|
|
Stdout.line "$(Num.toStr (mySum 2))"
|
|
|
|
bind : (a, b -> c), a -> (b -> c)
|
|
bind = \fn, a ->
|
|
\b -> fn a b
|
|
|
|
anySum : Num a, Num a -> Num a
|
|
anySum = \a, b ->
|
|
a + b + 2
|