Boost logo

Boost :

Subject: Re: [boost] De Bruijn Bind (alternate bind syntax) Interest?
From: David Sankel (camior_at_[hidden])
Date: 2010-09-02 17:08:46


2010/9/2 David Sankel <camior_at_[hidden]>

> 2010/9/2 Dave Abrahams <dave_at_[hidden]>
>
> On Thu, Sep 2, 2010 at 11:57 AM, David Sankel <camior_at_[hidden]> wrote:
>>
>> > Hello all,
>> >
>> > I've been working on an alternate bind syntax based on De Bruijn
>> > indices[1].
>> > The syntax is very simple, yet the terms are very powerful.
>> >
>> > Here is an example of a function const that takes in an argument c and
>> > returns another function that, for all input, returns c:
>> >
>> > //ëx.ëy.x = ëë1 with De Bruijn indices.
>> >
>>
>> Not according to the page you linked below. What am I missing?
>>
>> [1] http://en.wikipedia.org/wiki/De_Bruijn_index
>>
>
> Sorry about that. The wikipedia page uses 1-indexed indices where I'm using
> 0-indexed indices. So, increment 1 on all my examples to get the wikipedia
> syntax.
>

I'm beginning to think it is better to use 1-indexing instead of 0-indexing
all around. It will be both compatible with the Wikipedia page and familiar
to boost bind/lambda users.

Funny thing is, I started with 1-indexing but changed it to 0-indexing for
the fallacious reasoning of the arrrrgh function that Dave A mentioned.

-- 
David Sankel
Sankel Software
www.sankelsoftware.com
585 617 4748 (Office)

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk