Skip to content

Instantly share code, notes, and snippets.

View Liudx1985's full-sized avatar
😇
All repos are moved to https://gitee.com/liudx1985/ Permanently!

Liudx Liudx1985

😇
All repos are moved to https://gitee.com/liudx1985/ Permanently!
View GitHub Profile
@Liudx1985
Liudx1985 / amb.ss
Last active August 29, 2015 14:00
amb in scheme (call-with-current-continuation)
#lang r5rs
(define amb-fail '*)
(define initialize-amb-fail
(lambda ()
(set! amb-fail
(lambda ()
(display "amb tree exhausted")))))
(initialize-amb-fail)
import numpy as np
from pylab import *
raw = np.array([
[0, 0.0],
[0.15708, 0.156313],
[0.314159, 0.308879],
[0.471239, 0.453952],
[0.628319, 0.587785],
[0.785398, 0.706871],