Skip to content

swr1bm86/ADT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADT

Algebraic Data Type

Build Status

Installation

Clojars Project

Usage

:dependencies [[zjhmale/adt "0.1.0"]]

Examples

(require [adt.sweet :refer :all])

(defadt ::tree
  Empty-tree
  (Leaf value)
  (Node left-tree value right-tree))

(defn depth
  [t]
  (match t
    Empty-tree 0
    (Leaf _) 1
    (Node l v r) (inc (max (depth l) (depth r)))))

License

Copyright © 2010 Rich Hickey and the various contributors

Distributed under the Eclipse Public License, the same as Clojure.

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy