This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
cateye /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun May 10 06:26:20 -0700 2009 | |
| |
LICENSE | Wed Sep 16 09:44:13 -0700 2009 | |
| |
Rakefile | Sun May 10 06:26:20 -0700 2009 | |
| |
Setup.lhs | Sun May 10 00:31:53 -0700 2009 | |
| |
cateye.cabal | Tue Oct 20 13:48:57 -0700 2009 | |
| |
changelog.md | Sun May 10 00:31:53 -0700 2009 | |
| |
readme.md | Tue May 26 14:32:33 -0700 2009 | |
| |
src/ | Sun Aug 16 09:04:50 -0700 2009 | |
| |
tasks/ | Sun May 10 06:35:59 -0700 2009 |
readme.md
CatEye : Lisp with Style :)
Intro
I followed Write Yourself a Scheme in 48 Hours and tweaked the code a bit to make it feel sexier :)
Features
Reverse application
(1, + 2)! as define
(! (id x) x)Ruby style lambda
(! (flip f) (|x y| f y x))Program in Chinese
(设 关羽 "关羽-云长")[] as (), {} as list literal
[sum {(+ 0 1) 2 3 4}]eval
[eval '(+ 1 2)]
Install
- haskell/ghc
-
You will now have the cabal binary in $HOME/.cabal/bin. You should also add this directory to your $PATH.wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.2/cabal-install-0.6.2.tar.gz tar -zxf cabal-install-0.6.2.tar.gz cd cabal-install-0.6.2 ./bootstrap.sh cateye
git clone git://github.com/nfjinjing/cateye.git cd cateye cabal update cabal install
Use
Run
cateye
Load module
[load "path-to-source"]
basic prelude
check out cateye-repo/scm/p.scm
example: project euler question 1
[load "scm/p.scm"]
[! from-to-step [|x y s|
if [> x y]
{}
[cons x [from-to-step [+ x s] y s]]]]
[! quick-sort-unique [|xs|
if [xs, null?]
{}
[reduce concat
{ [quick-sort-unique [filter [curry > [car xs]] xs]]
{[car xs]}
[quick-sort-unique [filter [curry < [car xs]] xs]]
}
]]]
[! unique quick-sort-unique]
[! [q1] [[[[
from-to-step 3 999 3
], concat [from-to-step 5 999 5]
], unique
], sum
]]







