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

Lisp and Scheme

Name: Anonymous 2007-03-08 8:14 ID:fc2iv5gF

Why is this shit still around? Didn't Haskell obsolete it 20 years ago?

Compare map:

 (define (map f lst)
   (let loop ((lst lst)
              (res '()))
     (if (null? lst)
       (reverse res)
       (loop (cdr lst)
             (cons (f (car lst)) res)))))

vs.

 map f []     = []
 map f (x:xs) = f x : map f xs

Name: Anonymous 2011-04-06 19:56

Haskell has operators. Tons of them.

! <+> <> +++ <-> <|> // <$> </> >< ## $$ << <?> ==> !! # $+$ /=? <&>
|+ |- &&? .* .|. <$$> <.> <||> ==? ? \\/ ||? !> $ && &&& &&@ *. -<-
-=- ->- . .&. .&.? .= /=@ /\\ <*> <+ <. <//> <:> <== <=> <=? <=@ <?
<@ <|*|> =<< ==@ >-> >. >:> >=> >=? >=@ >>> >? >@ \\\\ ^ ^^ |* |> ||
||* ||+ ||@ ||| ~: ~? ~~ !!! !-> !.! !>>= $! $$= $=! $> $~ $~! % %:
%= & &&. &> * *& *&&&* *&* ** *** ***** *<<<* *=* *=>* *> *>>>* *|*
+ ++ ++>> +/+ +: += +> +>> - -!- --> -->> -/\\- -::- -< -<=- -=> -?-
-?> -?>> -\\/- -| -|- -~> .$. .+ .++. .--. .-. .->. ... .... ./. ./=
.: .< .<= .== .=> .> .@. .\\. / /+/ /- /=&& /=. /==> /=> /=|| />/ /|
/~ /~? :+ :-> <$ <$?> <* <**> <++ <++> <-$ <-- </=? <<! <<< <<^ <<|
<<~ <=. <==? <@> <|?> =$$= =$= =*= =/= =< =<<! =<= =<>= ==&& ==. ===
===> ==|| =>> =~ =~~ >*> >++> >-- >=. >== >===> >=>=> >> >>= >>=#
>>@ >>^ >|< >||< ?&&? ?+ ?? ?||? @=? @? @?= @@ \\== ^# ^% ^. ^<< ^>>
^^. ^^^ |*| |-| |. |..| |.| |/ |// |: |<- |= |=| |? |\\ |\\\\ ||.
|||| ~=? ~> ~?= ~|||~ ~||~ ~|~ ~~> ~~? ~~~>

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