Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit d09dd0ba authored by Sean Gillespie's avatar Sean Gillespie
Browse files

Add more power examples

parent ab7c607b
No related branches found
No related tags found
No related merge requests found
......@@ -96,3 +96,11 @@ spec = do
it "power 2 3 = 8" $ do
"(\\m n f x. (n m) f x) (\\f x. f (f x)) (\\f x. f (f (f x)))"
`shouldEvalTo` "\\f x. f (f (f (f (f (f (f (f x)))))))"
it "power n 0 = 1" $ do
"(\\m n f x. (n m) f x) n (\\f x. x)"
`shouldEvalTo` "\\f x. f x"
it "power n 1 = n" $ do
"(\\m n f x. (n m) f x) n (\\f x. f x)"
`shouldEvalTo` "\\f x. n f x"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment