--- Begin Message ---Roeloff, Is this for the Advent of Code 2018? The easiest way is to read the input file... Then, I can guide you from there! ;)----------------- Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero". (A. Einstein) On Sunday, December 2, 2018, 4:49:06 a.m. EST, Roelof Wobben <r.wob...@home.nl> wrote: Hello, I have a collection that looks like this : sampleData1 "comment stating purpose of message" ^ #( -8 +7) I want to add those numbers up but the code chokes at the + so I did this : FrequencyFinderData new class sampleData1 inject: 0 into: [:sum :each | (each ~= $+) ifTrue: [sum + each asInteger] ] so when the each is not a + it must count it but still the code chokes at the + Where do I think wrong ? Roelof
--- End Message ---
Re: [Pharo-users] How to take care that the + before a number is ignored
Benoit St-Jean via Pharo-users Sun, 02 Dec 2018 02:44:47 -0800
- [Pharo-users] How to take care that the + b... Roelof Wobben
- Re: [Pharo-users] How to take care tha... Hilaire
- Re: [Pharo-users] How to take care... Roelof Wobben
- Re: [Pharo-users] How to take ... Benoit St-Jean via Pharo-users
- Re: [Pharo-users] How to take ... Richard O'Keefe
- Re: [Pharo-users] How to t... Roelof Wobben
- Re: [Pharo-users] How to t... Roelof Wobben
- Re: [Pharo-users] How to take care tha... Benoit St-Jean via Pharo-users
- Re: [Pharo-users] How to take care... Roelof Wobben
- Re: [Pharo-users] How to take ... Benoit St-Jean via Pharo-users
- Re: [Pharo-users] How to t... Roelof Wobben
- Re: [Pharo-users] How... Benoit St-Jean via Pharo-users
- Re: [Pharo-users]... Sven Van Caekenberghe
- Re: [Pharo-us... Benoit St-Jean via Pharo-users
- Re: [Pharo-users] How... Sven Van Caekenberghe
- Re: [Pharo-users] How... Benoit St-Jean via Pharo-users
- Re: [Pharo-users]... Roelof Wobben
- Re: [Pharo-us... Benoit St-Jean via Pharo-users