|
From: | Chicken Trac |
Subject: | Re: [Chicken-janitors] #1020: matchable: Add conversion pattern(s) |
Date: | Fri, 12 Jul 2013 09:12:28 -0000 |
#1020: matchable: Add conversion pattern(s) --------------------------------+------------------------------------------- Reporter: syn | Owner: ashinn Type: enhancement | Status: new Priority: not urgent at all | Milestone: someday Component: extensions | Version: 4.8.x Resolution: | Keywords: matchable --------------------------------+------------------------------------------- Comment(by syn): Another nice use is destructuring records using slot accessors rather than the positional {{{($ struct pat-1 … pat-n)}}} pattern: {{{ (define-record point x y) (match (list (make-point 1 2) (make-point 3 4)) (((-> point-x xs) ...) xs)) ;; => (1 3) }}} -- Ticket URL: <http://bugs.call-cc.org/ticket/1020#comment:2> Chicken Scheme <http://www.call-with-current-continuation.org/> Chicken Scheme is a compiler for the Scheme programming language.
[Prev in Thread] | Current Thread | [Next in Thread] |