Skip to content

Instantly share code, notes, and snippets.

View Sylvenas's full-sized avatar
🎯
Focusing

ZXT Sylvenas

🎯
Focusing
View GitHub Profile
@Sylvenas
Sylvenas / docker-help.md
Created July 8, 2021 11:43 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@Sylvenas
Sylvenas / Task.js
Last active December 29, 2020 12:21
Functional programming Task async in parallel
// Task(functor,applicative,monad)
const Task = fork => ({
map: f => Task((reject, resolve) =>
fork(reject, a => resolve(f(a)))),
ap: fn =>
Task((reject, resolve) => fork(reject, a =>
fn.map(a).fork(reject, resolve)
)),
chain: f =>
Task((reject, resolve) => fork(reject, a =>
@Sylvenas
Sylvenas / task.js
Created May 22, 2020 11:08
Functional programming Task async in parallel
// Task(functor,applicative,monad)
const Task = fork => ({
map: f => Task((reject, resolve) =>
fork(reject, a => resolve(f(a)))),
ap: fn =>
Task((reject, resolve) => fork(reject, a =>
fn.map(a).fork(reject, resolve)
)),
chain: f =>
Task((reject, resolve) => fork(reject, a =>