View functionmusings.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
type alias Function a b = a -> b | |
const : b -> Function a b | |
const b _ = b | |
compose : Function a b -> Function b c -> Function a c | |
compose = | |
(>>) |
View listcompalt.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
import Signal exposing (Address) | |
import Html exposing (Html, div, ul, li) | |
type alias Component action state effect view | |
= state | |
-> (action -> (state, List effect), view) | |
type alias HtmlComponent action state effect | |
= Component action state effect (Address action -> Html) |
View componentalt.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
import Signal exposing (Address) | |
import Html exposing (Html, div, span, button, text) | |
import Html.Events exposing (onClick) | |
import Time | |
type alias Component action state effect view = | |
state -> (action -> (state, List effect), view) | |
View componentalt2.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
import Signal exposing (Address) | |
import Html exposing (Html, div, button, span, text) | |
import Html.Events exposing (onClick) | |
type alias Component action state effect view | |
= action | |
-> state | |
-> (state, List effect, view) | |
View compaltcounterpair.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
import Signal exposing (Address) | |
import Html exposing (Html, div, button, span, text) | |
import Html.Events exposing (onClick) | |
type alias Component action state effect view | |
= Maybe action -> state -> (state, view, List effect) | |
type alias HtmlComponent action state effect |
View componentstandard.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
import Signal exposing (Address) | |
import Html exposing (Html, div, button, text, span) | |
import Html.Events exposing (onClick) | |
type alias Init options state effect = options -> (state, List effect) | |
type alias Update action state effect = action -> state -> (state, List effect) | |
type alias View state view = state -> view | |
type alias Component options action state effect view = |
View HelloTriangle.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
import MJS (..) | |
import Graphics.WebGL (..) | |
main = webgl (400, 400) scene | |
type Point = {point : V3} | |
toPoint vector = { point = vector } | |
triangle : V3 -> V3 -> V3 -> Triangle Point | |
triangle p1 p2 p3 = (toPoint p1, toPoint p2, toPoint p3) |
View JuliaSets.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
------------------------------------------------ | |
-- GLOBAL VARIABLES TO PLAY WITH | |
------------------------------------------------ | |
-- number of iterations of the Julia Set | |
maxIterations : Int | |
maxIterations = 100 | |
-- The constant c used in the julia function |
View HexagonalGrid.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
import List (..) | |
import Graphics.Collage (..) | |
import Graphics.Element (..) | |
import Color (..) | |
------------------------------------------ | |
-- 2D Point Type | |
type alias Point = { | |
x : Float, | |
y : Float |
View RotatingCube.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
import Graphics.WebGL as GL | |
import Math.Vector3 as GL | |
import Math.Matrix4 as GL | |
type Point = { | |
x : Float, | |
y : Float, | |
z : Float | |
} |
OlderNewer