Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

perlisp

Name: Anonymous 2008-12-09 14:07

itt: post your optimisations/versions of perlisp


#!/usr/bin/perl
sub car {
    return $_[0];
}
sub cdr {
    shift; return $_[0];
}
print car "test1", "test2";
print "\n";
print cdr "test1", "test2";
print "\n";

Name: Anonymous 2008-12-09 14:12

itt: post your optimisations/versions of haskellisp

car = head
cdr = tail

Name: Anonymous 2008-12-09 14:24

itt: post your optimisations/versions of lisplisp
(define (cons a b) (lambda (f) (f a b)))

(define (car x) (x (lambda (a b) a)))

(define (cdr x) (x (lambda (a b) b)))

Name: Anonymous 2008-12-09 16:06

OP is a bullshit.

sub cons($$){[@_]}
sub car($){$_[0]->[0]}
sub cudder($){$_[0]->[1]}

Name: Anonymous 2008-12-09 16:14

itt: post your optimisations/versions of forthlisp

: cons 2 cells allocate throw tuck cell+ ! tuck ! ;
: car @ ;
: cdr cell+ @ ;

Name: Anonymous 2008-12-09 16:18

Oops, forgot my [code].

: cons 2 cells allocate throw tuck cell+ ! tuck ! ;
: car @ ;
: cdr cell+ @ ;

Name: Anonymous 2008-12-09 16:23

sub cons {
    my ($x, $y) = @_;
    sub { $_[0]($x, $y) }
}

sub car {
    $_[0](sub { $_[0] })
}

sub cdr {
    $_[0](sub { $_[1] })
}

Name: Anonymous 2009-03-06 7:25

I make programs wF   my API if   you dont repost   this comment on   10 other pages   i will hax   your anus tonight   and make a   mess of your   computer and ass.

Name: Anonymous 2010-12-28 7:57

Don't change these.
Name: Email:
Entire Thread Thread List