View Day06.elm
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
module Day06 exposing (partOne, partTwo) | |
import Set exposing (Set) | |
type alias Signal = | |
String | |
findStartOfPacketMarker : Int -> Signal -> Int |
View Day05.elm
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
module Day05 exposing (partOne, partTwo) | |
import Dict exposing (Dict) | |
import List.Extra as List | |
type alias Crate = | |
Char | |
View Day04.elm
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
module Day04 exposing (partOne, partTwo) | |
import Parser exposing ((|.), (|=), Parser, Step(..), int, loop, map, oneOf, run, spaces, succeed, symbol) | |
type alias Range = | |
( Int, Int ) | |
type alias RangePair = |
View Day03.elm
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
module Day03 exposing (partOne, partTwo) | |
import Set exposing (Set) | |
type alias ItemType = | |
Char | |
itemTypePriority : ItemType -> Int |
View Day02.elm
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
module Day02 exposing (partOne, partTwo) | |
type alias Score = | |
Int | |
type Outcome | |
= Win Score | |
| Draw Score | |
| Loss Score |
View Day01.elm
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
module Day01 exposing (partOne, partTwo) | |
decreasingOrder : comparable -> comparable -> Order | |
decreasingOrder a b = | |
case compare a b of | |
LT -> | |
GT | |
EQ -> | |
EQ |
View fails.ts
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
function EditText<T extends React.ElementType = "h1">({ | |
as: Component = "h1", | |
children | |
}: EditTextProps<T>) { | |
Component | |
return <Component>{children}</Component>; | |
} |
View works.ts
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
function EditText<T extends React.ElementType = "h1">({ | |
as, | |
children | |
}: EditTextProps<T>) { | |
const Component = as || "h1"; | |
return <Component>{children}</Component>; | |
} |
View Kata.elm
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
module Kata exposing (fromNb2Str) | |
fromNb2Str n modsys = | |
let | |
gcd : Int -> Int -> Int | |
gcd a b = | |
if b == 0 then | |
a |
View invert-tree.elm
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
fold (\v l r -> Node v r l) Empty tree |
NewerOlder