Skip to content

Instantly share code, notes, and snippets.

Christophe christophejunke

  • https://www.parrot.com
  • 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
christophejunke / fizzbuzz.pl
Last active Dec 31, 2018
FizzBuzz alternative
View fizzbuzz.pl
% tested with http://eclipseclp.org/
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)
{
/* PARAMETERS */
/* Upper bound of loop (inclusive) */
const unsigned int upper_bound = 12;
You can’t perform that action at this time.