We tried to port this code to python and I learned that we cannot have a
set containing a set :(
and other uglies like len(str) but not str.len()
Stef
Le 22/10/15 22:58, stepharo a écrit :
Hi
I was programming an exercise with one of my son (well in Python
arghh)
and I end it up
On 22-10-15 23:25, Ferlicot D. Cyril wrote:
Want would be the uses of this method?
Show how to run out of memory real quickly?
Demonstrate why you want generators?
Stephan
Hi all,
just bouncing on this subject as we had this interesting discussions some time
ago:
http://forum.world.st/Another-extension-proposal-gt-subsets-td107678.html
Cheers,
Cédrick
ro <steph...@free.fr>
> To: "Pharo Development List" <pharo-dev@lists.pharo.org>
> Subject: [Pharo-dev] powerSet
>
> Hi
>
> I was programming an exercise with one of my son (well in Python
> arghh)
> and I end it up doing it in Pharo
Sent: Thursday, October 22, 2015 at 4:58 PM
> > From: stepharo <steph...@free.fr>
> > To: "Pharo Development List" <pharo-dev@lists.pharo.org>
> > Subject: [Pharo-dev] powerSet
> >
> > Hi
> >
> > I was programming an exerci
Hi,
I propose a simpler implementation:
4 in: [ :e | (1 to: e) combinations ]
;)
I'm do not think that my son is allowed to use combination in python too.
did you check the implementation of combinations :)?
Stef
Vincent
Le 2015-10-22 23:25, Ferlicot D. Cyril a écrit :
Le 22/10/2015
Hi,
Want would be the uses of this method?
Apparently this is something really common on sets, you get all the
subparts combinations.
Stef
> On 23 Oct 2015, at 09:41, stepharo wrote:
>
>> Hi,
>>
>> Want would be the uses of this method?
>
> Apparently this is something really common on sets, you get all the subparts
> combinations.
>
> Stef
https://en.wikipedia.org/wiki/Power_set
The empty set should
Hi
I was programming an exercise with one of my son (well in Python
arghh)
and I end it up doing it in Pharo (I'm save now).
The idea was to write one function that computes the powerset
powerset(4)
= a Set(a Set(1) a Set(1 2) a Set(3) a Set(2) a Set(1 3) a Set(2 3)
a Set(1 2 3)
Hi,
I propose a simpler implementation:
4 in: [ :e | (1 to: e) combinations ]
Vincent
Le 2015-10-22 23:25, Ferlicot D. Cyril a écrit :
Le 22/10/2015 22:58, stepharo a écrit :
Hi
I was programming an exercise with one of my son (well in Python
arghh)
and I end it up doing it in Pharo
10 matches
Mail list logo