## Compared

 home1 home2  Bib  Algorithms  Bioinfo  FP  Logic  MML  Prog.Lang and the  Book

FP (external)
FP (local)
H-98
SML
SML97
λx.e \x->e fn x=>e
normal-order evaluation by need, non-strict eager, strict
fixed-point combinator, Y triggers a type-checker bug in ghc!['05] y.sml

ho hum :-) Haskell 98 SML 97
: h:t, list cons(tructor) e:t, e has type t
:: e::t, e has type t x::xs, list cons(tructor)

e has type t e :: t e : t
reference type n.a. t ref (contents, deref, !x) (assign, :=)
polymorphic type data T u v = C u v |... datatype ('u, 'v) t = C of 'u*'v |...
product type, U×V×... (u,v,...) u*v*...
function type,  -> u -> v u -> v
t*,  i.e., the type `list of t', [t] t list
tuple value (x1, x2, ...) (x1, x2, ...)
list cons x : xs x :: xs
empty list,  < >, ε [] nil or []
non-empty list [1,2,3] [1,2,3]
function sqr x = x*x fun sqr x = x*x
function by cases len [] = 0
len (_:xs) = 1 + len xs
fun len [] = 0
| len (_::xs) = 1 + len xs
anonymous function λx.e \x-> e fn x=>e
composition (.)::(b->c)->(a->b)->a->c op o:('b->'c)*('a->'b)->'a->'c
e.g., ((fn x=>x+1)o(fn x=>x*x)) 2
val it = 5 : int
let let decs in exp let decs in exp end
conditional if e then et else ef if e then et else ef
case case e of pat->e |... case e of pat=>e |...
 Coding Ockham's Razor, L. Allison, Springer A Practical Introduction to Denotational Semantics, L. Allison, CUP

 Linux  Ubuntu free op. sys. OpenOffice free office suite The GIMP ~ free photoshop Firefox web browser

 © L. Allison   http://www.allisons.org/ll/   (or as otherwise indicated), Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University, was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.) Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Wednesday, 26-Jun-2024 08:12:04 AEST.