- Cut:
C-w
- Paste:
C-y
- Move selection line up:
M-up (move-text-up)
- Move selection line down:
M-down (move-text-down)
- Move cursor forward one char:
C-f
- Move cursor backward one char:
C-b
- Move cursor forward one world:
M-f
- Move cursor backward one world:
M-b
###Switch
This is horrible (change required)
- variant A
switch(type) {
case value:
break;
##Ideas
###Tuple
const a = ('hello', 'world')
a._1 // 'hello'
to
const a = { _1: 'hello', _2: 'world'}
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
export function createReducer(initialState, handlers) { | |
const match = (key, type) => ( | |
key | |
.replace(/ /g, '') | |
.split(',') | |
.reduce((acc, k) => ( | |
acc || type.indexOf(k) > -1 ? k : null | |
), null) | |
); |
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
{ | |
"type":"Page", | |
"value":"<!DOCTYPE html>", | |
"body":[ | |
{ | |
"type":"Tag", | |
"value":"html", | |
"attr":[ | |
{ | |
"type":"Attribute", |
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
quicksort :: (Ord a) => [a] -> [a] | |
quicksort [] = [] | |
quicksort (x:xs) = | |
let smallerOrEqual = [a | a <- xs, a <= x] | |
larger = [a | a <- xs, a > x] | |
in quicksort smallerOrEqual ++ [x] ++ quicksort larger |
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
quicksort :: (Ord a) => [a] -> [a] | |
quicksort [] = [] | |
quicksort (x:xs) = | |
let smallerOrEqual = [a | a <- xs, a <= x] | |
larger = [a | a <- xs, a > x] | |
in quicksort smallerOrEqual ++ [x] ++ quicksort larger |
OlderNewer