diff --git a/deno.lock b/deno.lock index 3696618..f29acc5 100644 --- a/deno.lock +++ b/deno.lock @@ -102,6 +102,12 @@ "https://deno.land/x/dnt@0.39.0/lib/utils.ts": "224f15f33e7226a2fd991e438d0291d7ed8c7889807efa2e1ecb67d2d1db6720", "https://deno.land/x/dnt@0.39.0/mod.ts": "9df36a862161d9eb376472b699f6cb08ba0ad1704e0826fbe13be766bd3c01da", "https://deno.land/x/dnt@0.39.0/transform.ts": "f68743a14cf9bf53bfc9c81073871d69d447a7f9e3453e0447ca2fb78926bb1d", + "https://deno.land/x/maybeasy@v6.0.0/mod.ts": "62e8bad0367465ff9baf1861ba23e51e2fe19feaea2fe298965f1b4d46a30ac8", + "https://deno.land/x/maybeasy@v6.0.0/src/Catamorphism.ts": "e1293671598451b31339c04f74cbf416a62f563a95290218c39ebf92b06ec4fc", + "https://deno.land/x/maybeasy@v6.0.0/src/Just.ts": "04c317ad1ee79e28beb0134a921bcd559596e3beb5446ab32965aac01d40ecdd", + "https://deno.land/x/maybeasy@v6.0.0/src/Maybe.ts": "5ff6284c12ddc3856f5bdf65ed9f7d70aa7f2c16dd175e8b737388dd61c45e29", + "https://deno.land/x/maybeasy@v6.0.0/src/Nothing.ts": "ba9f72b4e879306f3d104aebef87734d47f3a4463123762730633a6b8fd8a125", + "https://deno.land/x/maybeasy@v6.0.0/src/index.ts": "437b0255e8ffb1da9c869d8369cca9c0613bdc0cb45d01d104c2f91dfd4701d8", "https://deno.land/x/ts_morph@20.0.0/bootstrap/mod.ts": "b53aad517f106c4079971fcd4a81ab79fadc40b50061a3ab2b741a09119d51e9", "https://deno.land/x/ts_morph@20.0.0/bootstrap/ts_morph_bootstrap.js": "6645ac03c5e6687dfa8c78109dc5df0250b811ecb3aea2d97c504c35e8401c06", "https://deno.land/x/ts_morph@20.0.0/common/DenoRuntime.ts": "6a7180f0c6e90dcf23ccffc86aa8271c20b1c4f34c570588d08a45880b7e172d", diff --git a/mod_test.ts b/mod_test.ts new file mode 100644 index 0000000..2d846ec --- /dev/null +++ b/mod_test.ts @@ -0,0 +1,10 @@ +import { assert } from "https://deno.land/std@0.208.0/assert/mod.ts"; +import { just } from "https://deno.land/x/maybeasy@v6.0.0/mod.ts"; + +Deno.test(function testRelease() { + just(1) + .map((x) => x + 1) + .andThen((x) => just(x + 1)) + .do((x) => assert(x === 3)) + .elseDo(() => assert(false)); +})