NOTE: Bad Idea, put Haskell in S expression?

Dan's
Blog

Programming Language Theory • System Programming

NOTE: Bad Idea, put Haskell in S expression?

Just record a bad idea www.

(data Point
  ; constructor-name type*
  [Point Int Int]
  (deriving (Eq, Ord)))
(data List (a)
  [nil]
  [cons a (List a)])
(cons 1 nil) ; infer get a=Int

(= absolute (n)
   (case (< n 0)
     [#t (- n)]
     [#f n]))
(= f (+ x y)
   (where
    (= x 1)
    (= y 2)))
(:: fib (Integer -> Integer))
(= fib (0) 1)
(= fib (1) 1)
(= fib (n)
   (+ (fib (- n 1))
      (fib (- n 2))))

The major challenge would be = can be repeated. Therefore, have to record each binding and convert to a pattern matching.

author: Lîm Tsú-thuàn/林子篆/Danny

category:cs

tag:notelanguagerackethaskell

Similar Articles

Buy Me A CoffeeCreative Commons Attribution-NonCommercial-NoDerivatives 4.0 InternationalAll works in this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
©2021 dannypsnl(林子篆)