I hereby claim:
- I am dinocarl on github.
- I am dinocarl (https://keybase.io/dinocarl) on keybase.
- I have a public key ASDKE0ZRqX9N0qWa_W_hgF_DGsLmbgaWta9UtVWiQUAV2go
To claim this, I am signing this object:
| const apCh = (fn, accVal) => (item) => accVal = fn(accVal, item); | |
| const scanr = curry((fn, acc, xs) => map( | |
| apCh(fn, acc), | |
| xs | |
| )) | |
| scanr(add, 0)( | |
| [5,6,7,8] | |
| ); |
| // use transducers | |
| const appendTo = flip(append); | |
| const apCh = (fn, accVal) => (item) => accVal = fn(accVal, item); | |
| const steps = [ | |
| filter(test(/[()]/)), | |
| map((item) => item === '(' ? 1 : -1), | |
| map(apCh(add, 0)), // scan transducer | |
| ]; |
| // meta-programming part | |
| @mixin dynamicallyAvailableExtend($placeholder) { | |
| %#{$placeholder} { | |
| @content; | |
| } | |
| } | |
| @mixin extend($placeholders...) { | |
| @each $placeholder in $placeholders { | |
| @extend %#{$placeholder}; |
I hereby claim:
To claim this, I am signing this object:
| // Given a value with a unit | |
| // return the value without the unit | |
| @function strip-unit($item) { | |
| @if type-of($item) == 'number' and not unitless($item) { | |
| @return $item / ( $item * 0 + 1 ); | |
| } | |
| @return $item; | |
| } |
| const data1 = [ | |
| {id: 1, status: true}, | |
| {id: 2, status: false}, | |
| {id: 3, status: true}, | |
| ]; | |
| const data2 = [ | |
| {id: 1, status: true}, | |
| {id: 2}, | |
| {id: 3, status: true}, |
| const clamp = (min, max, x) => Math.min(Math.max(x, min), max); | |
| const clmp = (minVal, maxVal) => compose( | |
| min(maxVal), | |
| max(minVal) | |
| ); |
| const data = {'a.b': 1, 'c.d': 7, 'c.d': 9} | |
| const assocPathDataLast = curry( | |
| (mergeAble, pathList, val) => assocPath(pathList, val, mergeAble) | |
| ); | |
| const processKeys = compose( | |
| split('.'), | |
| head | |
| ); |
| const filterOperations = { | |
| eq: equals, | |
| neq: complement(equals), | |
| lt: gt, | |
| gt: lt, | |
| lte: gte, | |
| gte: lte, | |
| includes: includes, | |
| } |