This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let R = require('ramda') | |
let filecontent = R.compose( | |
JSON.stringify, | |
R.assoc('scope', 'source.js'), | |
R.flip(R.assoc('completions'))({}), | |
R.map(R.converge(R.merge, [R.flip(R.assoc('trigger'))({}), R.flip(R.assoc('content'))({})])), | |
R.keys | |
)(R) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let S = require('sanctuary') | |
let R = require('ramda') | |
let filecontent = R.compose( | |
JSON.stringify, | |
R.assoc('scope', 'source.js'), | |
R.flip(R.assoc('completions'))({}), | |
R.map(R.converge(R.merge, [R.flip(R.assoc('trigger'))({}), R.flip(R.assoc('content'))({})])), | |
R.keys | |
)(S) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from fn import F, recur | |
from datetime import datetime | |
from funcy import mapcat, walk_values, merge as funcymerge, group_by | |
# basic combinators | |
I = F(lambda x: x) # identity | |
K = F(lambda x: F(lambda y: x)) # constant | |
T = F(lambda x: F(lambda f: f(x))) # thrush | |
A = F(lambda f: F(lambda x: f(x))) # apply |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* aperture function modelled after https://ramdajs.com/docs/#aperture | |
*/ | |
const head = xs => xs[0] | |
const last = xs => xs[xs.length - 1] | |
const tail = xs => xs.slice(1) | |
const isEmpty = xs => xs.length == 0 | |
/* A recursive aperture implementation |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.