Skip to content

Instantly share code, notes, and snippets.

View alersenkevich's full-sized avatar
😎

Sasha alersenkevich

😎
View GitHub Profile
@alersenkevich
alersenkevich / reduce.go
Created July 13, 2019 20:02
reduce in go
func Reduce(arr, reduceFunc, acc interface{}) float64 {
arrValue := redirectValue(reflect.ValueOf(arr))
if !IsIteratee(arrValue.Interface()) {
panic("First parameter must be an iteratee")
}
returnType := reflect.TypeOf(Reduce).Out(0)
isFunc := IsFunction(reduceFunc, 2, 1)
@alersenkevich
alersenkevich / .eslintrc
Created July 19, 2019 06:50
eslint + typescript + react
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true },
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": [
"airbnb",
"prettier",
@alersenkevich
alersenkevich / accordion-react-component-with-animation.markdown
Created July 19, 2019 10:55
Accordion react component with animation