Here's a struct in C:
struct Point
{
int x;
int y;
} ;
Given a variable p0
which is typed as struct Point
:
[?] (letrec length = (\l ⇒ ((cond (isNull l)) 0) (succ (length (tail l)))) in length) | |
| [+] t0 | |
| [?] (\l ⇒ ((cond (isNull l)) 0) (succ (length (tail l)))) | |
| | [+] t1 | |
| | [?] (((cond (isNull l)) 0) (succ (length (tail l)))) | |
| | | [+] t2 | |
| | | [?] ((cond (isNull l)) 0) | |
| | | | [+] t3 | |
| | | | [?] (cond (isNull l)) | |
| | | | | [+] t4 |
Here's a struct in C:
struct Point
{
int x;
int y;
} ;
Given a variable p0
which is typed as struct Point
:
# PHPUnit recipe for kicker | |
require 'osx/cocoa' | |
recipe :phpunit do | |
process do |files| | |
execute "phpunit" | |
end | |
end | |
# take control of the growl notifications |
{-# LANGUAGE DoRec #-} | |
module ExprLang where | |
import Control.Monad.Error | |
import Data.List | |
import Data.Maybe | |
-- Language |
import Network.Mail.Mime | |
import qualified Data.ByteString.Lazy.UTF8 as LU | |
import qualified Data.ByteString.Lazy as B | |
import qualified Data.ByteString as S | |
import Control.Monad | |
import qualified HaskellNet.SMTP as HN | |
import Text.Pandoc | |
import Text.Hamlet | |
import Text.XHtml.Transitional hiding ( renderHtml ) |
(define (make-simple-generator iterable transformer) | |
(define (re-entry return) | |
(define (iter-action element) | |
(define (escaper new-re-entry) | |
(set! re-entry new-re-entry) | |
(return ( transformer element))) | |
(call-with-current-continuation escaper)) | |
(for-each iter-action iterable) | |
(return 'Let-it-end!)) | |
// | |
// by Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
// MIT Style License | |
// see also: http://wiki.ecmascript.org/doku.php?id=strawman:iterators | |
// | |
// --------------------------------------- | |
// 1. Iteration via for-in loop | |
// --------------------------------------- |
if RUBY_ENGINE == 'macruby' | |
framework 'CoreServices' | |
WATCHED_EXTS = "rb,builder,erb,nokogiri" | |
PASSENGER_RESTART_FILE = File.expand_path(File.join(File.dirname(__FILE__), "..", "tmp", "restart.txt")) | |
DELAY = 3 | |
def modified_files(path) | |
Dir.glob("#{File.expand_path(path)}/*.{#{WATCHED_EXTS}}").map do |filename| | |
begin |
#### Monad - common code | |
# bind takes a step and processor, | |
# and combines them into a step | |
# (S t) -> (t -> S u) -> (S u) | |
bind = (step, processor) -> (container) -> | |
result = step container | |
(processor result.value) result.container | |
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install Django psycopg2 django-sentry | |
bin/pip freeze > requirements.txt | |
bin/django-admin.py startproject mysite | |
cat >.gitignore <<EOF | |
bin/ | |
include/ | |
lib/ | |
EOF |