Play

Check-in [b568971705]
Login
Overview
Comment:Add maybe module.
Timelines: family | ancestors | descendants | both | stdlib
Files: files | file ages | folders
SHA3-256: b568971705905962902a75415cbe5afa9eb66106c84ba7c67eae19f8be1db79e
User & Date: robin.hansen on 2021-04-08 14:29:47
Other Links: branch diff | manifest | tags
Context
2021-04-09
07:37
Added Pair/2-Tuple data structure. check-in: a327035cc3 user: robin.hansen tags: stdlib
2021-04-08
14:29
Add maybe module. check-in: b568971705 user: robin.hansen tags: stdlib
14:20
Add number functions. check-in: 9354cf1321 user: robin.hansen tags: stdlib
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified stdlib/play.json from [3204ae30a9] to [3afdc904a2].

1
2
3
4
5
6

7
8
9
10
{
    "name": "play/standard_library",
    "version": "0.2.0",
    "language-version": "0.2.0",
    "exposed-modules": [
        "core"

    ],
    "dependencies": {},
    "package-paths": []
}





|
>




1
2
3
4
5
6
7
8
9
10
11
{
    "name": "play/standard_library",
    "version": "0.2.0",
    "language-version": "0.2.0",
    "exposed-modules": [
        "core",
        "maybe"
    ],
    "dependencies": {},
    "package-paths": []
}

Added stdlib/src/maybe.play version [00d98b8fe3].









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
defunion: Maybe a
: a
: Nothing

defstruct: Nothing

defmulti: map
type: (Maybe a) [ a -- b ] -- (Maybe b)
: a
  !
: Nothing
  drop

defmulti: when-nothing
type: (Maybe a) a -- a
: a
  drop
: Nothing
  swap drop