lambda.frink

View or download lambda.frink in plain text format


// Test of Lambda calculus and closures... which aren't implemented yet.

add = { |x| { |y| x+y }  }
println["One:   " + add]

add1 = add[1]   // Apply function, should create closure where x -> 1
println["Two:   " + add1]

println["Three: " + add1[4]]


View or download lambda.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 18013 days, 13 hours, 1 minutes ago.