Haskell | Racket | notes |
---|---|---|
null | null? or empty? | not to be confused with null/empty |
map, zipWithN | map | Haskell's map is just zipWith1, after all |
length | length | |
length . filter | count | |
filter | filter | |
filter . not | filter-not | also, negate can be used to inverse a predicate |
lookup | assoc | |
foldr | foldr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
var numRows = 3; | |
var numCols = 4; | |
// a = Array.geom(numRows*numCols,1,3); | |
a = Array.series(numRows*numCols, start: 1, step: 1); | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
w=Canvas(Tk(), width=320, height=240) | |
w.pack() | |
w.create_line(0, 0, 200, 100) | |
w.create_line(0, 0, 190, 100) | |
mainloop() | |
from tkinter import * | |
a=Frame(Tk()) | |
a.mainloop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import math | |
import json | |
from pythonosc import dispatcher | |
from pythonosc import osc_server | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boing | |
brass | |
carp | |
ciani | |
growl | |
k | |
s | |
wat | |
yuck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d5 $ every 2 (rev) $ stack [ | |
sound "hardkick bd hardkick" # n "1 2 3" | |
, slow 0.5 $ striate 32 $ sound "crow*10" | |
# hpf "600 1200" | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
superset xs = []:(superset' xs) -- remember the empty list | |
superset' (x:xs) = [x]:(map (x:) (superset' xs)) ++ superset' xs | |
superset' [] = [] | |
items = [("Ant Repellent", 1, 2), | |
("Beer", 3, 9), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// go build dns.go && ./dns` | |
// dig +qr +tries=1 +time=1 @localhost -p 9000 foo.com | |
import ( | |
"bytes" | |
"encoding/binary" | |
"encoding/hex" | |
"errors" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Marconi Union - Time Lapse | |
groovesalad | |
Enduser - Def (Version 2) | |
cliqhop | |
Sinepearl - Cosmic Center | |
groove salad [5/27/2016 2:37:18 PM] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<thead> | |
<tr class="header"> | |
<th style="text-align: right;">Haskell</th> | |
<th style="text-align: left;">Racket</th> | |
<th style="text-align: center;">notes</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr class="odd"> |
NewerOlder