From ab4d6ca6195a3e1a2197d6f48d7fca6d1f2c79b9 Mon Sep 17 00:00:00 2001 From: Brandon Blaylock Date: Wed, 13 Mar 2024 19:38:58 -0700 Subject: [PATCH] chore: update docs and github runner --- .github/workflows/deno.yml | 4 ++-- README.md | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index d3c53ee..20e0d2a 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - deno: ["v1.36"] + deno: ["v1.41.1"] os: [ubuntu-latest] steps: @@ -40,7 +40,7 @@ jobs: strategy: matrix: - deno: ["v1.36"] + deno: ["v1.41.1"] # os: [macOS-latest, windows-latest, ubuntu-latest] os: [ubuntu-latest] diff --git a/README.md b/README.md index 9e59884..731760a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,24 @@ Some non-goals of functional are: - To be an exact port of fp-ts. Many changes have been implemented throughout functional that diverge sharply from fp-ts, this is often on purpose. +## Usage + +This library is a collection of smaller tools. This means that each one should +be imported separately. There is no barrel export, instead once should pull in +the modules they need individually. Following is an example importing from jsr +withing deno. + +```ts +import * as A from "jsr:@baetheus/fun/array"; +import { pipe } from "jsr:@baetheus/fun/fn"; + +pipe( + A.range(5), // get 5 numbers 0-4 + A.map(n => n * n), // square them + console.log // [ 0, 1, 4, 9, 16 ] +); +``` + ## Documentation Documentation is generated for each github tagged release. The latest