22
33Common Functional Programming Algebraic data types for JavaScript that is compatible with most modern browsers and Deno.
44
5- [ ![ deno land] ( http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno&labelColor=black )] ( https://deno.land/x/functional@v1.2.0 )
5+ [ ![ deno land] ( http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno&labelColor=black )] ( https://deno.land/x/functional@v1.2.1 )
66[ ![ deno version] ( https://img.shields.io/badge/deno-^1.5.4-lightgrey?logo=deno )] ( https://github.com/denoland/deno )
77[ ![ GitHub release] ( https://img.shields.io/github/v/release/sebastienfilion/functional )] ( https://github.com/sebastienfilion/functional/releases )
88[ ![ GitHub licence] ( https://img.shields.io/github/license/sebastienfilion/functional )] ( https://github.com/sebastienfilion/functional/blob/v0.5.0/LICENSE )
@@ -25,8 +25,8 @@ the [Fantasy-land specifications](https://github.com/fantasyland/fantasy-land).
2525
2626``` js
2727import { compose , converge , lift , map , prop } from " https://x.nest.land/ramda@0.27.0/source/index.js" ;
28- import Either from " https://deno.land/x/functional@v1.2.0 /library/Either.js" ;
29- import Task from " https://deno.land/x/functional@v1.2.0 /library/Task.js" ;
28+ import Either from " https://deno.land/x/functional@v1.2.1 /library/Either.js" ;
29+ import Task from " https://deno.land/x/functional@v1.2.1 /library/Task.js" ;
3030
3131const fetchUser = userID => Task .wrap (_ => fetch (` ${ URL } /users/${ userID} ` ).then (response => response .json ()));
3232
@@ -62,7 +62,7 @@ As a convenience, when using Functional in the browser, you can use the **unmini
6262
6363``` js
6464import { compose , converge , lift , map , prop } from " https://x.nest.land/ramda@0.27.0/source/index.js" ;
65- import { Either , Task } from " https://deno.land/x/functional@v1.2.0 /functional.js" ;
65+ import { Either , Task } from " https://deno.land/x/functional@v1.2.1 /functional.js" ;
6666
6767const fetchUser = userID => Task .wrap (_ => fetch (` ${ URL } /users/${ userID} ` ).then (response => response .json ()));
6868
@@ -228,7 +228,7 @@ assert(pair.first === 44);
228228The Type factory can be used to build complex data structure.
229229
230230``` js
231- import { factorizeType } from " https://deno.land/x/functional@v1.2.0 /library/factories.js" ;
231+ import { factorizeType } from " https://deno.land/x/functional@v1.2.1 /library/factories.js" ;
232232
233233const Coordinates = factorizeType (" Coordinates" , [ " x" , " y" ]);
234234const vector = Coordinates (150 , 200 );
@@ -292,7 +292,7 @@ vector.toString();
292292## Sum Type factory
293293
294294``` js
295- import { factorizeSumType } from " https://deno.land/x/functional@v1.2.0 /library/factories.js" ;
295+ import { factorizeSumType } from " https://deno.land/x/functional@v1.2.1 /library/factories.js" ;
296296
297297const Shape = factorizeSumType (
298298 " Shape" ,
@@ -374,7 +374,7 @@ oval.toString();
374374#### Example of writing a binary tree with Sum Types
375375
376376``` js
377- import { factorizeSumType } from " https://deno.land/x/functional@v1.2.0 /library/factories.js" ;
377+ import { factorizeSumType } from " https://deno.land/x/functional@v1.2.1 /library/factories.js" ;
378378
379379const BinaryTree = factorizeSumType (' BinaryTree' , {
380380 Node : [' left' , ' x' , ' right' ],
@@ -427,14 +427,14 @@ const tree =
427427You can import any types or the factories through ` mod.ts ` .
428428
429429``` ts
430- import { Either , IO , Maybe , Task , factorizeType , factorySumType } from " https://deno.land/x/functional@v1.2.0 /mod.ts" ;
430+ import { Either , IO , Maybe , Task , factorizeType , factorySumType } from " https://deno.land/x/functional@v1.2.1 /mod.ts" ;
431431```
432432
433433Or, you can import individual sub-module with the appropriate TypeScript hint in Deno.
434434
435435``` ts
436- // @deno-types="https://deno.land/x/functional@v1.2.0 /library/Either.d.ts"
437- import Either from " https://deno.land/x/functional@v1.2.0 /library/Either.js" ;
436+ // @deno-types="https://deno.land/x/functional@v1.2.1 /library/Either.d.ts"
437+ import Either from " https://deno.land/x/functional@v1.2.1 /library/Either.js" ;
438438```
439439
440440## Deno
0 commit comments