FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Generator/JavaScript/6-do-maybe.js at master · HowProgrammingWorks/Generator · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
HowProgrammingWorks
/
Generator
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
17
Star
19
Code
Issues
1
Pull requests
9
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Generator
/
JavaScript
/
6-do-maybe.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (14 loc) · 339 Bytes
Breadcrumbs
Generator
/
JavaScript
/
6-do-maybe.js
Copy path
File metadata and controls
18 lines (14 loc) · 339 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
;
const
{
Just
}
=
require
(
'./helpers/maybe.js'
)
;
const
doMonad
=
require
(
'./helpers/do-notation.js'
)
;
Just
(
5
)
.
then
(
(
x
)
=>
Just
(
x
+
3
)
.
then
(
(
x
)
=>
Just
(
x
*
4
)
,
)
.
then
(
console
.
log
)
)
;
doMonad
(
function
*
(
)
{
const
a
=
yield
Just
(
5
)
;
const
b
=
yield
Just
(
3
)
;
const
c
=
yield
Just
(
4
)
;
console
.
log
(
(
a
+
b
)
*
c
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL