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
public static class FunctionExtensions | |
{ | |
public static Func<T2> Apply<T1, T2>(this Func<T1, T2> func, T1 input) => () => func(input); | |
public static Func<T2, T3> Apply<T1, T2, T3>(this Func<T1, T2, T3> func, T1 input) => x => func(input, x); | |
public static Func<T2, T3, T4> Apply<T1, T2, T3, T4>(this Func<T1, T2, T3, T4> func, T1 input) => | |
(a, b) => func(input, a, b); | |
public static Action Apply<T1>(this Action<T1> action, T1 input) => () => action(input); | |
public static Action<T2> Apply<T1, T2>(this Action<T1, T2> action, T1 input) => a => action(input, a); |
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
git branch -r | Select-String -Pattern "->" -NotMatch | Select-String -pattern "^ origin/" | foreach { $_ -replace '^ origin/', '' } | Foreach { git checkout $_ } |
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
import Html exposing (div, button, text, h3, h2, input) | |
import Html.Events exposing (onClick, onInput) | |
import Html.Attributes exposing(..) | |
type Direction = North | South | East | West | |
type alias Location = | |
{ x: Int | |
, y: Int |