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
package com.example.chess; | |
import java.util.Hashtable; | |
import java.util.Random; | |
import javafx.application.Application; | |
import javafx.geometry.Pos; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Button; | |
import javafx.scene.control.TextArea; | |
import javafx.scene.control.TextField; | |
import javafx.scene.layout.GridPane; |
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
-- Piping: Chaining functions | |
foo = | |
Html.text (String.fromInt (add 5 (multiply 10 (divide 30 10)))) | |
-- x |> f = f x | |
baz = | |
divide 30 10 | |
|> multiply 10 | |
|> add 5 |
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 Json.Decode exposing (Decoder, field, string) | |
gifDecoder : Decoder String | |
gifDecoder = | |
field "data" (field "image_url" string) |
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 PullRequestState | |
= Proposed | |
| Rejected | |
| Merged | |
branchColor : PullRequestState -> String | |
branchColor state = | |
case state of | |
Proposed -> | |
"yellow" |
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
add : Int -> Int -> Int | |
add a b = | |
a + b | |
addOne : Int -> (Int -> Int) | |
addOne a = | |
add 1 | |
two = | |
addOne 1 |
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 Maybe a | |
= Just a | |
| Nothing | |
-- Partial Functions | |
-- toFloat : String -> Maybe Float | |
a = | |
String.toFloat "123" |
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
list = | |
[ 1, 2, 3, 4 ] | |
push = | |
list ++ [ 5 ] | |
unshift = | |
0 :: 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
lampard = | |
{ name = "Frank" | |
, lastname = "Lampard" | |
, age = 41 | |
} | |
type alias Player = | |
{ name : String | |
, lastname : String |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="shortcut icon" href="/favicon.ico"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>initial hmtl example</title> | |
<link href="/static/css/main.487d312c.css" rel="stylesheet"> | |
</head> |
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
const { resolve, join } = require('path') | |
const CompressionPlugin = require('compression-webpack-plugin') | |
module.exports = { | |
entry: './app.js', | |
output: { | |
path: resolve(join(__dirname, 'build')), | |
filename: 'app.js' | |
}, | |
module: { |
NewerOlder