One of the great schisms in the Lisp community is if we should have car and cdr or first and rest. One of the benefits of the traditional car and cdr is that we can combine them to produce pronoucible functions like cdaddr. How do Lisps that do not use car and cdr, such as Clojure, typically form combinations like this with first and rest? Is there any consensus?
How do lisps that prefer first and rest to car and cdr approach combinations like cdaddr?
303 Views Asked by J. Mini At
1
There are 1 best solutions below
Related Questions in LIST
- Difference between list() and dict() with generators
- python how to write list of lists to file
- SML - Find same elements in a string
- How to divide list item by list item from another list using Python?
- How to get a certain element in a list of lists?
- How to read in numbers from n lines into a Scala list?
- Create a list of sequential monthly dates in PHP given initial date and quantity
- Python elegant way to sort numerically named directories
- sorting all data on multiple pages by clicking on its header
- List item keeps same memory address following sort/copy
- How to convert Hibernate List to String?
- using a for loop to compare lists
- How to keep track of word count in text file
- Running multiprocessing on two different functions in Python 2.7
- How do you fuse string items from two lists into new elements of a new list?
Related Questions in CLOJURE
- core.logic CLP(FD) with ClojureScript
- clojure worker-only app on heroku fails with Error R10
- How do persistent data structures help make Om faster
- Union in HoneySQL
- Reduce memory consumption in development
- twitter response: "error 32: Could not authenticate you" from Heroku, but not desktop
- How can I create a global object, and attach a string and a function to that object, in ClojureScript?
- AngularJS $http GET method to backend server: Request Method:OPTIONS 405
- Clojure : event listener on domina library
- Why is my streamparse topology definition complaining about a wrong number of arguments to thrift$mk-topology?
- Clojure defn name as multiplier
- clojure quoting inside let
- Build macro result with loops
- How do I unit test clojure.core.async go macros?
- Datomic and HornetQException "unable to validate user"
Related Questions in LISP
- Intercept and modify user input in Common Lisp
- Read next line when loading file in Common Lisp
- Calling CCL + Quicklisp script as executable with command line arguments and achieving the desired output
- Avoiding echos in Clozure lisp (noob)
- Backquote String Interpolation
- Structuring large Lisp applications
- If strings are vectors, why are they immutable?
- Invalid specialized parameter in method lambda list
- Emacs init.el and Elisp and equivalent of common lisp every-p function
- EVAL/APPLY: too many arguments given to F
- Insertion into a list doesn't reflect outside function whereas deletion does?
- How to traverse a tree in Clojure while collecting the value from each node node?
- in clojure, function argument type mismatch
- In Lisp is the function `1+` just syntactic sugar?
- Search function in lisp
Related Questions in CONS
- Counting vowel and consonant in a string
- What does (cons? list-name) do?
- Are expressions such as (set! c (cons 3 c)) the way to add an item to a list?
- Scheme explanation(construct)
- Creating a pair of pairs using Common Lisp
- Accumulators, conj and recursion
- Why does cons function called explicity works over Int in Scala?
- delete-doubles function (scheme)
- Using cons with tail of tail in a list throws an error
- How to convert a Tree in Haskell to a flat list
- Destructively reverse every cons node in an s-expression
- What does "my other car is a cdr" mean?
- Lisp difference between (cons 'a (cons 'b 'c)) and (cons 'a '(b.c))
- What's the difference between `::` and `+:` for prepending to a list)?
- The result of cons in "The Little Schemer"
Related Questions in CDR
- Strings as argument to function Scheme Racket
- How do I access the not-the-first elements of an array in Swift?
- SVG to CDR converter
- Asterisk 1.8 cdr-adaptive mysql
- Python function that returns tail of list
- Calculate call cost from rate table using MySQL
- Kamailio 5.4 Send CDR data to an API endpoint
- Save Asterisk CDR to an external host
- AWS Cognito OIDC Customizations
- From Mac iOS to Linux
- What does "my other car is a cdr" mean?
- Python: functional programming with cons, car & cdr
- mysql query - peak concurrent calls CDR data
- Lisp list manipulation issue
- Java read .cdr-File
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Clojure, at any rate, simply has no need for caddaadr and friends, because nobody builds data structures out of just cons cells. The language does have combinations of any two of
firstandnext, namedffirst,fnext,nnext, andnfirst, which were added very early on I suppose because it was assumed we'd want something like cadr, but I never see them used in real life. Instead destructuring is used quite often.On the rare occasions where you need to reach deeply into a structure built of nested sequences, destructuring often still produces readable code but also writing it out longhand is no great burden. It's also a good hint to you that maybe you should abstract thing a bit more rather than working with so many layers of primitive combinators directly.