Skip to content

Instantly share code, notes, and snippets.

@efcasado
efcasado / eqc.md
Last active December 16, 2023 00:07
A gentle introduction to (Erlang) QuickCheck

Erlang QuickCheck

What is QuickCheck?

QuickCheck is a language for stating properties of programs.

?FORALL(X, nat(), X*X >= 0)
@efcasado
efcasado / kata.erl
Created February 1, 2013 23:10
Solucion para la kata 'rectangulos de texto'.
-module(kata).
-define(SIDES, 4).
-export([msg2rect/1]).
msg2rect(Message) ->
VChars = length(Message) div ?SIDES,
HChars = VChars + trunc(((length(Message) rem ?SIDES) / 2)),