Jeffrey Meunier has an implicit Curry macro here, which uses defmacro. I was wondering if someone has ever written this with syntax-rules?
Related Questions in MACROS
- drop down list to decide which range my graph will plot
- Catia V5 Dynamic Hidden Line Removal With Macro Please Help Me
- Convert macro to a function but cannot concatenate inputs using std::stringstream
- Common Lisp: How to use a macro within a macro?
- How to remove the "*" in c++ macro args?
- Caused by : java. awt. HeadlessException
- When I click "enable macros" on my PowerPoint presentation, I get an error saying controls can't be activated. They're not registered on this computer
- SAS Macro Variables
- Generate unique type parameter in procedural derive macro
- unexpected interaction between macroexpand-1 and macrolet
- Can C macros be expanded in flex?
- External macro definition in header
- How to undefine and redefine a macro in C++?
- How to check if a macro argument is an integer literal in C
- How come clang and gcc don't produce a cast warning for this openssl macro, but do otherwise?
Related Questions in FUNCTIONAL-PROGRAMMING
- On Google Sheets (and only built-in functions allowed, no Google Apps Script) Is it possible to simulate pipe function?
- Why does Enum require to implement toEnum and fromEnum, if that's not enough for types larger than Int?
- Is there a functional way to map a list (N elements) to a list of sums of adjacent elements (N - 1 elements) in Kotlin?
- How to count the occurences of every element in a list in Haskell fast?
- Combine lists with absolute index in functional programming
- How to refactor a loop with iterator. (Returning from closure)
- In Haskell, what does `Con Int` mean?
- Setting up different Java class fields value by a single value on some counter value
- Why doesn't map read show (Integer) work to separate each value in a string of Integers?
- Grouping by multiple fields and counting using in Java 8
- Variable capture: How variables behave in function closures
- Composing React Providers with Value props in Typescript
- How can atomicModifyIORef cause leaks? And why does atomicModifyIORef' solve the problem?
- How can I change XMobar's Kbd monitor plugin such that clicking on it loops throught the layouts?
- How to get success or error data without folding the response while using fpdart in flutter?
Related Questions in SCHEME
- Lambda function not returning any value
- Encode "ä", "ö", "ü" and "ß" in scheme (file-output-port)
- How to programmatically expand the let* family of functions in racket
- Is there a way to implement named let as macro to make it work with Petrofsky let
- Scheme Question - How can I check if there are a list of pairs
- call/cc with Break procedure
- How to return in Scheme?
- SiCP Exercise 1.45
- Exercise 12.10 from the book Scheme and the art of programming
- How to write a Scheme function that uses call/cc to calculate factorial?
- Why can't a Scheme macro with the name "if" be defined?
- How to implement "if" in normal order in Scheme?
- Collision with syntax-rules identfiers and global names
- How to use let-values in Gambit Scheme?
- Racket: Issue with Sorting Strings in Ascending Order
Related Questions in CURRYING
- In Java, a currying function is thread-safe or not
- I've managed to pass two-arguments function, where one-argument function is expected
- How does combining higher-order functions work in JavaScript?
- Is it possible to write an expression macro in Swift to curry any function?
- fp-ts - how to reverse curried function order
- In F#, how do I map/lift a function where the result is curried?
- How do I find the return type of this curried function?
- Getting type error when using lodash's curryRight with mapValues
- Currying function which retains value using closure
- How do you create a callable variable to call a class method with arguments?
- How can I save the metadata of the user_function in curry?
- How can I implement the uncurry function on python?
- How to pass the second parameter to a Haskell function that takes 3 parameters?
- How can I fix "Not all constituents of type are callable" for a recursive function?
- (Python) How do I make imported functions automatically interact with global variables?
Related Questions in SYNTAX-RULES
- Why can't a Scheme macro with the name "if" be defined?
- Is it possible to define a syntax-rules macro in Common Lisp
- Is it possible to define anaphoric macros using syntax-rules only?
- What Scheme special forms must the hygienic macro expander know about?
- Why is my (guile) scheme macro evaluating its argument?
- How to create Alist from List using syntax-rules in Scheme?
- Scheme's syntax-rules -- intermixing different syntax choices in `...`
- Scheme syntax-rules matching any number of pattern variable before a literal?
- Scheme: How to expand a pattern with multiple variables in syntax-rules without parens
- Guile `syntax-rules`: Misplaced Ellipsis in Form; How to Write this Macro with Two Ellipses?
- Scheme macro pairwise processing question
- Introducing a Named Variable with Syntax Rules
- Provide syntax-rule Racket
- How to control order of Scheme macro expansion?
- How clojure macro parses special symbol?
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?
Popular Tags
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)
There are a number of curry implementations for Scheme -- none can be as elegant as Haskell, since there functions are always unary functions, so everything can be curried. (But this can of course be implemented in a sufficiently powerful Scheme like Racket.)
As for the macro that you've dug up -- it's a pretty bad one: not only does it use an unhygienic macro, it's also calling
evalexplicitly, and relies on an implementation of environments etc. But it's easy to do that with a simplesyntax-rulesmacro. AFAICT, this is what it implements:But there's an important note here. The page that you reference says that an problem of the function version is that it's explicit -- but it also has an important advantage: with the macro implementation you must define a function using
clambda, whereas the functional version can be used with any built in function. In many Scheme implementations there are facilities to inspect a function's arity, and using this it's possible to implement a currying function version that knows when to call the original function.