Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 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