Thanks to visit codestin.com
Credit goes to github.com

Skip to content
View rageofaxe's full-sized avatar
๐ŸŽฏ
Focusing
๐ŸŽฏ
Focusing

Block or report rageofaxe

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 250 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Effector's store for AsyncStorage Effector's store for AsyncStorage
    1
    import { Store, createEffect, createStore, forward } from "effector";
    2
    import AsyncStorage from "@react-native-async-storage/async-storage";
    3
    
                  
    4
    type LocalStore = <T>(key: string) => (value: T) => Store<T>;
    5
    
                  
  2. Ramda immutable queue Ramda immutable queue
    1
    const Queue = (list) => compose(
    2
      set(lensProp('get'),      always(list)),
    3
      set(lensProp('peek'),     always(head(list))),
    4
      set(lensProp('enqueue'),  (...elms) => Queue(concat(list, elms))),
    5
      set(lensProp('dequeue'),  (n = 1)   => Queue(drop(n, list)))
  3. ackermann function with ramda memoize ackermann function with ramda memoize
    1
    const ack = memoize((m, n) => cond([
    2
      [() => equals(m, 0),                () => inc(n)],
    3
      [() => and(gt(m, 0), equals(n, 0)), () => ack(dec(m), 1)],
    4
      [() => and(gt(m, 0), gt(n, 0)),     () => ack(dec(m), ack(m, dec(n)))]
    5
    ])(m, n))
  4. Functional fizzBuzz on ramda Functional fizzBuzz on ramda
    1
    const fizz = pipe(modulo(__, 3), equals(0))
    2
    const buzz = pipe(modulo(__, 5), equals(0))
    3
    
                  
    4
    const _cond = cond([[both(fizz, buzz), always("fizzbuzz")], 
    5
                        [buzz,             always("buzz")],