Move Roc CLI testing examples to crates/

This commit is contained in:
Jan Van Bruggen 2022-09-11 21:52:48 -06:00
parent 2eec200f09
commit 527f39b8f2
No known key found for this signature in database
GPG key ID: FE2A4E38E0FA6134
75 changed files with 56 additions and 49 deletions

View file

@ -0,0 +1,13 @@
app "fibonacci"
packages { pf: "fibonacci-platform/main.roc" }
imports []
provides [main] to pf
main = \n -> fib n 0 1
# the clever implementation requires join points
fib = \n, a, b ->
if n == 0 then
a
else
fib (n - 1) b (a + b)