
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
fantasy-arrayt
Advanced tools
Monad transformer for Javascript arrays
npm install fantasy-arrayt
Promise = require \fantasy-promises
ArrayT = require \fantasy-arrayt
ArrayPromise = ArrayT Promise
a = new ArrayPromise new Promise (resolve)->
set-timeout resolve, 3000, [1 to 10]
a.map (* 5) .chain -> ArrayPromise Promise.of [it, -it]
.run.fork console.log # here be side-effects
# 3 seconds later...
#=> 5, -5, 10, -10, 15, -15,...
type ArrayT m a = { run :: m [a] }
Monad m => ArrayT m creates a monad encapsulating a list wrapped with the monad m.
map :: ArrayT m a → (a → b) → ArrayT m b
chain :: ArrayT m a → (a → ArrayT m b) → ArrayT m b
of :: a → ArrayT m a
ap :: ArrayT m (a → b) → ArrayT m a → ArrayT m b
concat :: ArrayT m a → ArrayT m a → ArrayT m a
empty :: → ArrayT m a
reduce :: ArrayT m b → (a → b → a) → a → m b
reduceRight :: ArrayT m b → (a → b → a) → a → m b
take :: ArrayT m a → Integer → ArrayT m a
take :: ArrayT m a → Integer → ArrayT m a
drop :: ArrayT m a → Integer → ArrayT m a
tail :: ArrayT m a → ArrayT m a
head :: ArrayT m a → m a
initial :: ArrayT m a → ArrayT m a
last :: ArrayT m a → m a
reverse :: ArrayT m a → ArrayT m a
len :: ArrayT m a → m Integer
filter :: ArrayT m a → (a → Boolean) → ArrayT m a
reject :: ArrayT m a → (a → Boolean) → ArrayT m a
find :: ArrayT m a → (a → Boolean) → m a
mkString :: ArrayT m Stringable → m String (yay duck typing)
every :: ArrayT m a → (a → Boolean) → m Boolean
some :: ArrayT m a → (a → Boolean) → m Boolean
LicenceMIT. © 2013 Matt Brennan.
FAQs
fantasy-arrayt ============
We found that fantasy-arrayt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.