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 (text) | |
type alias T = {name: String} | |
type alias R b = {b | name: String, age: Float} | |
type alias S a = {a | name: String} | |
type alias Q = {age: Float} | |
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 Particle exposing (..) | |
import Array | |
import Task | |
import Html.App as App | |
import Window exposing (Size, resizes) | |
import Color exposing (Color, black, white, rgba) | |
import Element exposing (Element, toHtml) | |
import Collage exposing (Form, collage, move, rect, filled, circle) | |
import AnimationFrame exposing (times) |
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 RegisterMachine exposing (..) | |
import Html | |
import Time exposing (Time, second) | |
import Array exposing (Array) | |
import Html exposing (..) | |
import Html.Attributes exposing (style) | |
type Msg |
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 MyIntList exposing (..) | |
type MyList = Nil | Cons Int MyList | |
(#) : Int -> MyList -> MyList | |
(#) ele list = | |
Cons ele list | |
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 PortsExample where | |
import Graphics.Element exposing (show) | |
type alias MyModel = ( Int, List Int ) | |
initialModel : MyModel | |
initialModel = ( 0, [] ) |
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 Slides where | |
import Markdown | |
import Keyboard | |
import Html exposing (Html) | |
-- Data | |
type alias Slide = String | |
type alias SlideZipper = ( List Slide, List Slide ) |
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
defmodule SearchTweets do | |
# number of tweets that are provided with one request | |
# the twitter api allows maximum 100 | |
@chunk_size 100 | |
defp fetch_next(term, options) do | |
try do | |
ExTwitter.search(term, options) | |
rescue |
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
{ | |
"links": [ | |
{ | |
"source": 0, | |
"target": 10, | |
"value": 1 | |
}, | |
{ | |
"source": 0, | |
"target": 12, |
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
elm-stuff/ | |
*.html | |
*.js |
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
defmodule Brainfuck do | |
@moduledoc """ | |
Brainfuck, s. http://en.wikipedia.org/wiki/Brainfuck | |
""" | |
@register_size 100 | |
# Function to find the next corresponding closing bracket | |
defp find_closing_bracket([ 91 | rest ], pos, closing) do |