Skip to content

Instantly share code, notes, and snippets.

@efcasado
efcasado / eqc.md
Last active September 28, 2024 18:32
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)),