Skip to content

Instantly share code, notes, and snippets.

@jinjor
Created February 19, 2018 02:56
Show Gist options
  • Save jinjor/22171dbbf264ee00025b17ab3cf5d003 to your computer and use it in GitHub Desktop.
Save jinjor/22171dbbf264ee00025b17ab3cf5d003 to your computer and use it in GitHub Desktop.
module Tuple3 exposing (..)
get1and2 : ( a, b, c ) -> ( a, b )
get1and2 ( a, b, c ) =
( a, b )
get2and3 : ( a, b, c ) -> ( b, c )
get2and3 ( a, b, c ) =
( b, c )
set2 : b -> ( a, b, c ) -> ( a, b, c )
set2 b ( a, _, c ) =
( a, b, c )
set3 : c -> ( a, b, c ) -> ( a, b, c )
set3 c ( a, b, _ ) =
( a, b, c )
add3 : c -> ( a, b ) -> ( a, b, c )
add3 c ( a, b ) =
( a, b, c )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment