factorial n = product (range 1 (n+1))
blah n = product (range 1 (n+1))
blah2 z = product (range 1 (z+1))
#j1ejquc
src/
math.u
list.u
.unison/
j1ejquc/
ast.ub
names/
factorial
blah
8h7jbs5/
factorial n = product (range 1 (n + 1))
factorial =
n -> #8h7jbs5 (#h9bwx9q 1 (#e2i3biw n 1))
factorial =
$arg1 -> #8h7jbs5 (#h9bwx9q 1 (#e2i3biw $arg1 1))
.unison/
j1ejquc/
ast.ub
names/
factorial
blah
8h7jbs5/
.unison/
j1ejquc/
ast.ub
names/
factorial
.unison/
j1ejquc/
ast.ub
names/
transmogrify
myFactorialTest = expect (factorial 5 == 120)
.unison/
j1ejquc/
ast.ub
type.ub
names/factorial
myFactorialTest = expect (factorial 5 == 120)
.unison/
30hbxzj/
ast.ub
type.ub
evaluated.ub
names/myFactorialTest
factorialAt : Node ->{Remote} Nat
factorialAt bob =
r1 = at bob '(factorial 7)
r2 = at spawn '(factorial 8)
force r1 + force r2
dsort : (a -> a -> Boolean) -> [a] ->{Remote} [a]
dsort lte as =
if size as < 2 then as
else case halve as of (left, right) ->
resL = at spawn '(dsort lte left)
resR = at spawn '(dsort lte right)
merge lte (force resL) (force resR)
ability Remote where
at : Node -> '{Remote} a -> Future a
force : Future a -> a
spawn : Node
Remote.runLocal '(dsort hugeDataset)
Cloud.usEast.run '(dsort hugeDataset)
ability Remote where
at : Node -> '{Remote} a -> Future a
force : Future a -> a
spawn : Node