If you look at the type of Io notice that it is a type alias of just a good old function
type Io<'a> = Effects -> 'aThis is like saying
an
Ioof some value'ais just a function that takes available effects and returns back some'a.
| if [ $(date +%s) -ge $(date -d 2019-11-01 +%s) ]; | |
| then | |
| notify-send "Check out this cool thing!" | |
| fi |
| module Main where | |
| import qualified Data.Sequence as Seq | |
| import qualified Data.Set as S | |
| import qualified Data.Map.Strict as M | |
| type Position = (Int, Int) | |
| spotsAndPositions :: String -> (S.Set Position, M.Map Int Position) | |
| spotsAndPositions text = |
| from itertools import permutations | |
| with open('input.txt', 'r') as f: | |
| text = f.read() | |
| numbers = [int(c) for c in text if c in "0123456789"] | |
| lines = [line for line in text.split('\n') if line] | |
| positions = {} |
| function canAppear(enemy, environment) { | |
| return Boolean( | |
| (environment.isSunny && !enemy.isVampire) || | |
| (environment.isRainy && enemy.hasWaterResistantArmor) || | |
| enemy.hasntAppearedInAnHour | |
| ); | |
| } | |
| describe(canAppear, () => { | |
| [ |
| function canAppear(enemy, environment) { | |
| return Boolean( | |
| (environment.isSunny && !enemy.isVampire) || | |
| (environment.isRainy && enemy.hasWaterResistantArmor) || | |
| enemy.hasntAppearedInAnHour | |
| ); | |
| } | |
| describe(canAppear, () => { | |
| let enemy = {}; |
| output "function_names" { | |
| value = [ | |
| aws_lambda_function.hello.function_name, | |
| aws_lambda_function.goodbye.function_name | |
| ] | |
| } | |
| data "archive_file" "hello-zip" { | |
| type = "zip" | |
| source_dir = "../lambdas/hello/" |
| let map = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/List/map | |
| let concatSep = https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/Prelude/Text/concatSep | |
| let EnvVar : Type = { key : Text, value : Text } | |
| let Lambda : Type = { name : Text, envVars : List EnvVar } | |
| let tfEnvVar = \(envVar : EnvVar) -> | |
| " ${envVar.key} = ${envVar.value}" | |
| let tfLambdaFunctionName = \(lambda : Lambda) -> |
If you look at the type of Io notice that it is a type alias of just a good old function
type Io<'a> = Effects -> 'aThis is like saying
an
Ioof some value'ais just a function that takes available effects and returns back some'a.
| type Person = { Name: string; Age: int; FavoriteColor: string } | |
| let pickColor i = | |
| if i % 5 = 0 then "Brown" | |
| else if i % 3 = 0 then "Red" | |
| else if i % 2 = 0 then "Blue" | |
| else "Yellow" | |
| let people = |
| using System; | |
| using System.Linq; | |
| class Person { | |
| public string Name {get;set;} | |
| public int Age {get;set;} | |
| public string FavoriteColor {get;set;} | |
| } | |
| class MainClass { |