app "AoC2021Day01"
packages { base: "hello-world-platform" }
imports []
provides [ main ] to base
main : Str
main =
largeInput
|> windowsOf 3
This is a systematic in-depth exploration of different ways of calling functions in Roc.
In Roc, functions are values that are defined using lambda-expressions. Here are two single-argument functions on integers, one that increments a given number and another that doubles it.
inc : I64 -> I64
Implementation of the Jobs Puzzle in Curry
by Sebastian Fischer, January 2015
There are four people: Roberta, Thelma, Steve, and Pete.
Die RubyKara Erweiterung aus Kiel gibt es jetzt hier: https://github.com/sebfisch/rubykara-kiel |
{- | |
A German blog post translating Java code for the build tool Ant to Scala | |
http://funktionale-programmierung.de/2013/02/26/scala-java-ant.html | |
made me translate the Scala code to Haskell. I added combinators for binary | |
composition of mappers as well as a unit mapper for one of them. The code is | |
still shorter. I find the Haskell version more readable because expressions | |
and their types are separate rather than interleaved as in Scala. |
Currently, Snap and Yesod are the two most active web frameworks for Haskell. In this document, I compare the template languages used by those frameworks for generating HTML.
Both template languages let programmers write markup directly in a markup language rather than generating it from within Haskell. Compared with static HMTL, template languages support substitution to dynamically determine parts of the content of the generated page.
[Heist] and [Hamlet] support different constructs to generate content dynamically. They also differ regarding their syntax for static content.
#!/bin/bash | |
# Replaces classes in Android Package Files | |
# (c) Sebastian Fischer, CC-BY | |
# Can be used to rebuild an App with a modified version of a used library, | |
# as required for closed works that link to an LGPL library. | |
# Depends on: https://code.google.com/p/dex2jar/ |
Delimited continuations manipulate the control flow of programs. Similar to control structures like conditionals or loops they allow to deviate from a sequential flow of control.
We use exception handling as another example for control flow manipulation and later show how to implement it using delimited continuations. Finally, we show that nondeterminism can also be expressed using delimited continuations.
module ListTransformer where | |
import Control.Applicative | |
import Control.Arrow | |
import Control.Category | |
import Prelude hiding ( id, (.) ) | |
data ListConsumer a b | |
= Done b |