Hi,
Am 04.12.2008 um 10:44 schrieb Meikel Brandmeyer:
I almost whipped this up yesterday, but I got sidetracked thinking
about how best to provide a feature like Scheme's cond's =>. Do you
know it? It feeds the value of the test to the fn on the rhs of the
clause. It can be useful.
It seems my
Hello Rich,
On 4 Dez., 02:30, Rich Hickey <[EMAIL PROTECTED]> wrote:
> needle is a strange name - what's the origin? expr is probably better.
I thought of it as needle, which we search in the haystack. But
this comparison is not very good after a second thought. Changed
needle to expr.
> I thin
On Dec 3, 2:51 pm, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi Stuart and Rich,
>
> Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
>
> >> I'm pretty sure I don't like the sound of that at all. We had a nice
> >> discussion about fcase/condf, which I'd like to get in, here:
>
> >>http://grou
Hi,
Am 03.12.2008 um 21:10 schrieb Brian Doyle:
Can you include an example usage of this function? Thanks.
(condp = x
1 "We got a one."
2 (str "We got a " (- 3 1))
"We got something else."))
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
Hello again,
Am 03.12.2008 um 20:51 schrieb Meikel Brandmeyer:
cls (mapcat (fn [[x c]] `[(~xprd ~xndl ~x) ~c]) (partition 2
cls))
xndl (gensym "condp_needle__")
xprd (gensym "condp_predicate__")
Oops. These should of course be changed to be in the
right order.
Sincerel
Can you include an example usage of this function? Thanks.
On Wed, Dec 3, 2008 at 12:51 PM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi Stuart and Rich,
>
> Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
>
>> I'm pretty sure I don't like the sound of that at all. We had a nice
>>> discussio
Hi Stuart and Rich,
Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
I'm pretty sure I don't like the sound of that at all. We had a nice
discussion about fcase/condf, which I'd like to get in, here:
http://groups.google.com/group/clojure/browse_frm/thread/
dee910bef629...
And I haven't forgott
On Dec 2, 2:08 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I'm pretty sure I don't like the sound of that at all. We had a nice
> discussion about fcase/condf, which I'd like to get in, here:
>
> http://groups.google.com/group/clojure/browse_frm/thread/dee910bef629...
And I haven't forgotten abo
On Dec 2, 2:08 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Dec 2, 12:16 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> > In Ruby, most things match by value equality. But
> > classes match their instances. Ranges match things in the range.
> > Regexps match strings that they would match ag
On Dec 2, 9:22 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> For those of us that don't do Ruby - what does === do?
It's a supporting method for the case keyword
case object
when pred1: action1
when pred2: action2
..
end
translates to
if pred1 === object
action1
elsif pred2 === object
act
On Dec 2, 12:16 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> It is called "case equality" which is a terribly confusing way to say
> "the predicate used to match in case statements". "Match" is really
> the best verb. In Ruby, most things match by value equality. But
> classes match their
It is called "case equality" which is a terribly confusing way to say
"the predicate used to match in case statements". "Match" is really
the best verb. In Ruby, most things match by value equality. But
classes match their instances. Ranges match things in the range.
Regexps match string
On Dec 1, 5:07 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> I am thinking about adding a match method to Clojure-contrib. This
> would work like Ruby's threequals ("===", a.k.a. case equality) and
> would be implemented as a multimethod to do sensible things with a
> wide variety of types.
>
I am thinking about adding a match method to Clojure-contrib. This
would work like Ruby's threequals ("===", a.k.a. case equality) and
would be implemented as a multimethod to do sensible things with a
wide variety of types.
(1) Good idea?
(2) What should it be named?
Stuart
--~--~--
14 matches
Mail list logo