| 1 |
signature OPTION_GLOBAL = |
| 2 |
sig |
| 3 |
datatype 'a option = NONE | SOME of 'a |
| 4 |
|
| 5 |
exception Option |
| 6 |
|
| 7 |
val getOpt: 'a option * 'a -> 'a |
| 8 |
val isSome: 'a option -> bool |
| 9 |
val valOf: 'a option -> 'a |
| 10 |
end |
| 11 |
|
| 12 |
signature OPTION = |
| 13 |
sig |
| 14 |
include OPTION_GLOBAL |
| 15 |
|
| 16 |
val app: ('a -> unit) -> 'a option -> unit |
| 17 |
val compose: ('a -> 'b) * ('c -> 'a option) -> 'c -> 'b option |
| 18 |
val composePartial: ('a -> 'b option) * ('c -> 'a option) -> 'c -> 'b option |
| 19 |
val filter: ('a -> bool) -> 'a -> 'a option |
| 20 |
val join: 'a option option -> 'a option |
| 21 |
val map: ('a -> 'b) -> 'a option -> 'b option |
| 22 |
val mapPartial: ('a -> 'b option) -> 'a option -> 'b option |
| 23 |
end |