Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Higher-order-functions/ATS/higher-order-functions.ats
Normal file
13
Task/Higher-order-functions/ATS/higher-order-functions.ats
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include
|
||||
"share/atspre_staload.hats"
|
||||
|
||||
fun app_to_0 (f: (int) -> int): int = f (0)
|
||||
|
||||
implement
|
||||
main0 () =
|
||||
{
|
||||
//
|
||||
val () = assertloc (app_to_0(lam(x) => x+1) = 1)
|
||||
val () = assertloc (app_to_0(lam(x) => 10*(x+1)) = 10)
|
||||
//
|
||||
} (* end of [main0] *)
|
||||
Loading…
Add table
Add a link
Reference in a new issue