Skip to content

Instantly share code, notes, and snippets.

Christophe christophejunke

  • France
Block or report user

Report or block christophejunke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f2cfb21aa20ffcf4f30e6d6907defeb6
(defpackage :ev (:use :cl :optima :alexandria))
(in-package :ev)
(defstruct (meta (:constructor meta (form))) form)
(defun alist/augment (env namespace key value)
(acons namespace (acons key value (cdr (assoc namespace env))) env))
(defun alist/augment* (env namespace fresh-alist)
(acons namespace (nconc fresh-alist (cdr (assoc namespace env))) env))
christophejunke /
Last active Dec 31, 2018
FizzBuzz alternative
% tested with
divisors_term(_, [3,5],"FizzBuzz").
divisors_term(_, [3], "Fizz").
divisors_term(_, [5], "Buzz").
divisors_term(N, [], N).
% first clause, always fails, but with side-effects
fizz_buzz :-
% backtrackably iterates N from 1 to 100 by 1
View gist:277fea96cddd5b263f58c4a957415946
#include <stdio.h>
#include <stdbool.h>
int main (void)
/* Upper bound of loop (inclusive) */
const unsigned int upper_bound = 12;
You can’t perform that action at this time.