Skip to content
View gabefinch's full-sized avatar
💅
💅
Block or Report

Block or report gabefinch

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 100 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

  1. streams.js streams.js
    1
    function nums(n = 1) {
    2
      return { first: n, rest: () => nums(n + 1) };
    3
    }
    4
    
                  
    5
    nums().first;  // => 1
  2. Linked list reverser Linked list reverser
    1
    function reverseList(input, accumulator) {
    2
      var reversed = { 
    3
        id: input.id, 
    4
        next: accumulator || null 
    5
      };
  3. PersistentObject.class.js PersistentObject.class.js
    1
    export default class PersistentObject {
    2
      constructor(name, contents) {
    3
        this._validateContents(contents);
    4
        this.name = name;
    5
        this.contents = contents;
  4. PlantUML skinparams PlantUML skinparams
    1
    @startuml
    2
      ' Basic styles that improve on defaults
    3
      skinparam BackgroundColor Bisque
    4
      skinparam NoteBorderColor DeepSkyBlue
    5
      skinparam ArrowColor Navy
  5. Fisher–Yates shuffle Fisher–Yates shuffle
    1
    // Great explanation https://bost.ocks.org/mike/shuffle/
    2
    // This relies on mutation. Could the algorithm be recreated using immutable data?
    3
    function shuffle(array) {
    4
      var count = array.length
    5
      while (count) {