This file contains hidden or 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
const R = require('ramda') | |
const undoable = (shape) => { | |
const operation = actionSelection => R.evolve( | |
R.map(R.cond([ | |
[R.is(Function), R.identity], | |
[R.is(Array), actionSelection], | |
[R.is(Object), R.pipe(undoable, actionSelection)], | |
[R.T, R.identity], | |
]), shape) |
This file contains hidden or 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
```ts | |
type Tail<F extends Function, S extends Number> = | |
S extends 0 ? (F extends (...args: infer TArgs) => any ? TArgs : never) : | |
S extends 1 ? (F extends (a: any, ...args: infer TArgs) => any ? TArgs : never) : | |
S extends 2 ? (F extends (a: any, b: any, ...args: infer TArgs) => any ? TArgs : never) : | |
S extends 3 ? (F extends (a: any, b: any, c: any, ...args: infer TArgs) => any ? TArgs : never) : | |
S extends 4 ? (F extends (a: any, b: any, c: any, d: any, ...args: infer TArgs) => any ? TArgs : never) : | |
S extends 5 ? (F extends (a: any, b: any, c: any, d: any, e: any, ...args: infer TArgs) => any ? TArgs : never) : | |
S extends 6 ? (F extends (a: any, b: any, c: any, d: any, e: any, f: any, ...args: infer TArgs) => any ? TArgs : never) : | |
never |
- Project Euler
- Dojorio
- DojoPuzzles
This file contains hidden or 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
alias.ln !sh -c "git config --global \"alias.$1\" \"$2\"" | |
alias.aliases config --get-regexp alias | |
alias.st status | |
alias.branch-name rev-parse --abbrev-ref HEAD | |
alias.upstream-name !git for-each-ref --format=%\(upstream:short\) $(git symbolic-ref -q HEAD) | |
alias.last log --date=iso8601 --stat -1 | |
alias.ls log --pretty=format:"%C(yellow)%h %C(reset)%s%C(blue) [%cn]%C(red)%d" | |
alias.ldr log --pretty=format:"%C(yellow)%h %ad %C(reset)%s%C(blue) [%cn]%C(red)%d" --date=relative | |
alias.ld log --pretty=format:"%C(yellow)%h (%ad) %C(reset)%s%C(blue) [%cn]%C(red)%d" --date=iso8601 | |
alias.tree !git ls --graph |
This file contains hidden or 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 styled from 'types-styled-components-v3/native' | |
export default styled |
NewerOlder