This file contains hidden or 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
| def foo | |
| p self | |
| end | |
| p self | |
| foo |
This file contains hidden or 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
| % Peano's Axioms | |
| :- module(peano, [ | |
| is_zero/1, | |
| is_natural/1, | |
| equal/2, | |
| add/3, | |
| subtract/3, | |
| multiply/3, | |
| divide/3 | |
| ]). |
This file contains hidden or 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
| % Peano's Axioms | |
| :- module(peano, [ | |
| is_zero/1, | |
| is_natural/1, | |
| equal/2, | |
| pred/2 | |
| ]). | |
| /** Peano's Axioms | |
| * |
This file contains hidden or 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 Maybe<T> = T | undefined; | |
| function maybeMap<T, U>(mv: Maybe<T>, f: (v:T) => U) : Maybe<U> { | |
| if(mv !== undefined) { | |
| return f(mv); | |
| }else{ | |
| return undefined; | |
| } | |
| } | |
| function maybeBind<T, U>(mv: Maybe<T>, f: (v:T) => Maybe<U>) : Maybe<U> { | |
| if(mv !== undefined) { |
This file contains hidden or 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 FolditTest do | |
| use ExUnit.Case | |
| doctest Foldit | |
| def to_keyword([], keyword), do: keyword | |
| def to_keyword([val], keyword) do | |
| Keyword.update(keyword, nil, [val], fn existing -> [val | existing] end) | |
| end |
This file contains hidden or 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 Id | |
| = Id Int | |
| idIs : Id -> { a | id : Id } -> Bool | |
| idIs thisId = | |
| idFieldIs .id thisId | |
| idFieldIs : (a -> Id) -> Id -> a -> Bool |
This file contains hidden or 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 Shared.UserAlert exposing (UserAlert, Msg, show, startShowAlertAnimation, startHideAlertAnimation, default, update, view) | |
| import Helpers exposing (classes) | |
| import Shared.Animation as Animation | |
| import Html exposing (Html, div, span, text) | |
| import Html.Attributes exposing (class) | |
| import Task | |
| type UserAlert |
This file contains hidden or 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 Editable exposing (..) | |
| type Editable ofType | |
| = NotEditing { value : ofType } | |
| | Editing { originalValue : ofType, buffer : ofType } | |
| value : Editable ofType -> ofType | |
| value editable = |
This file contains hidden or 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
| namespace :elm do | |
| Apps = [ "WorkspaceMain", "ManageSubscribersMain", "NotebookMain", "ResponsesMain" ] | |
| JsFileName = "irn_elm.js" | |
| JsOutputDir = "app/assets/javascripts" | |
| desc "Updates packages, compiles the Elm code and copies it to #{JsOutputDir}" | |
| task :compile_and_copy => [:package_install, :make, :copy] do | |
| puts "Updated Packages, Compiled and copied Elm code to #{JsOutputDir}" | |
| end |
This file contains hidden or 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
| -- support stuff for remote stuff | |
| type alias ErrorMessages = | |
| Dict.Dict String (List String) | |
| type alias ApiError = | |
| { message : String | |
| , errors : ErrorMessages | |
| , explanation : Maybe String | |
| } |
NewerOlder