T Color.
| Red.;
| Blue.;
Desugars to:
T False | |
T True | |
| true; | |
Not(A: Type): Type | |
A -> False | |
T Equal<A: Type> ~ (a: A, b: A) | |
| same<a: A> ~ (a, a); |
$ cat head2.fm | |
head2.IO.readline(_: Unit): IO(String) | |
use line = IO.ask<String>("get_line", "") | |
IO.end<String>(line) | |
head2: IO(Unit) | |
get bind pure = IO.monad | |
let io0 = pure<>(Unit.new) | |
let io1 = bind<,>(io0, head2.IO.readline) |
$ cat example.fm | |
example.3.0 : _ | |
pythonic.str.split("", "abc") | |
example.3.1 : _ | |
["a", "b", "c"] | |
example.3.test: The(_, example.3.1) | |
The.value<>(example.3.0) |
$ head head.fm | |
head.splitc(c: Char, xs: List(Char)): List(List(Char)) | |
case xs: | |
| nil => List.nil<List(Char)>; | |
| cons => if U16.eql(xs.head, c) | |
then List.cons<>(c, head.splitc(c, xs.tail)) | |
else head.splitc(c, xs.tail); | |
head.splitc_example3 : _ | |
head.splitc('x', ['a', 'x', 'b']) |
head.splitc_example3 : The(List(List(Char)), head.splitc('x', ['a', 'x', 'b'])) | |
The.value<List(List(Char))>([['a'], ['b']]) | |
Inside head.splitc_example3: | |
Found type... The(List(List(Char)),List.cons(List.cons('a',List.nil),List.cons(List.cons('b',List.nil),List.nil))) | |
Instead of... The(List(List(Char)),head.splitc('x',List.cons('a',List.cons('x',List.cons('b',List.nil))))) | |
On line 19: | |
18| head.splitc_example3 : The(List(List(Char)), head.splitc('x', ['a','x', 'b'])) | |
19| The.value<List(List(Char))>([['a'], ['b']]) |
from __future__ import print_function | |
import contextlib | |
import pytest | |
# Introduce a Loud integer class that has some annoying properties that force us into a bunch of | |
# set up in our tests (in this case, to prevent unnecessary output to stdout during test) | |
class LoudInt(int): |
$ tf plan -out tfplan && tf apply tfplan ; alert "Terraformed! (0)" | |
GoSM: Setting up security policy for terraform binary.GoSM: Setting up security policy for terraform binary. | |
Warning: module.global.module.restricted-area--unrestricted.module.continent--asia.module.gke.data.google_container_engine_versions._: "region": [DEPRECATED] Use location instead | |
Warning: module.global.module.restricted-area--unrestricted.module.continent--asia.module.gke.module.nodepool--batch--f1-micro.google_container_node_pool._: "region": [DEPRECATED] use location instead | |
$ cat ~/bin/colortest16777216 | |
#!/usr/bin/env python3 | |
# pylint: disable=g-import-not-at-top,missing-docstring,g-wrong-blank-lines | |
from collections import namedtuple | |
class Color(namedtuple('Color', 'r g b')): | |
"""values are 0 to 1""" | |
@classmethod |
$ brew config | |
HOMEBREW_VERSION: 1.6.3-dirty | |
ORIGIN: [email protected]:Linuxbrew/brew.git | |
HEAD: b67917c837f1fb9c5bf2494cfd89b4eee6802802 | |
Last commit: 6 hours ago | |
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core | |
Core tap HEAD: 968e12cee4398a031dc80eef3f2cde5bb656ad81 | |
Core tap last commit: 3 hours ago | |
HOMEBREW_PREFIX: /home/buck/prefix/brew | |
HOMEBREW_REPOSITORY: /home/buck/prefix/brew |