equal
deleted
inserted
replaced
310 (*reverse composition*) |
310 (*reverse composition*) |
311 fun f #> g = g o f; |
311 fun f #> g = g o f; |
312 fun f #-> g = uncurry g o f; |
312 fun f #-> g = uncurry g o f; |
313 |
313 |
314 (*conditional application*) |
314 (*conditional application*) |
315 fun b ? f = fn x => if b x then f x else x |
315 fun b ? f = fn x => if b x then f x else x; |
316 |
316 |
317 (*view results*) |
317 (*view results*) |
318 fun `f = fn x => (f x, x); |
318 fun `f = fn x => (f x, x); |
319 fun tap f x = (f x; x); |
319 fun tap f = fn x => (f x; x); |
320 |
320 |
321 (*composition with multiple args*) |
321 (*composition with multiple args*) |
322 fun (f oo g) x y = f (g x y); |
322 fun (f oo g) x y = f (g x y); |
323 fun (f ooo g) x y z = f (g x y z); |
323 fun (f ooo g) x y z = f (g x y z); |
324 fun (f oooo g) x y z w = f (g x y z w); |
324 fun (f oooo g) x y z w = f (g x y z w); |