On Sun, Jun 14, 2009 at 4:51 PM, Miguel Mitrofanov wrote:
> ghci> map reverse $ foldM (\answer list -> [x:answer | x <- list, not $ x
> `elem` answer]) [] [[2,3], [1,2], [2,3,4], [1,2,3]]
> [[2,1,4,3],[3,1,4,2],[3,2,4,1]]
>
> On 14 Jun 2009, at 12:06, Fernan Bolando wrote:
>
>> Hi all
>>
>> If I ha
On Sun, Jun 14, 2009 at 2:06 AM, Fernan Bolando wrote:
> Hi all
>
> If I have a number of list
> example
> list1 = [2,3]
> list2 = [1,2]
> list3 = [2,3,4]
> list4 = [1,2,3]
>
> I want to create a list from the list above with n elements,
> non-repeating and each elements index represents 1 of the
Just guessing. How do you know it's an accident?
Richard O'Keefe wrote:
>
> On 15 Jun 2009, at 4:26 pm, Tony Morris wrote:
>
>> Prelude Data.List> nub . concat $ [[2, 3], [1, 2], [2, 3, 4], [1, 2, 3]]
>> [2,3,1,4]
>
> In this particular case. But that's a lucky accident.\
>
>
--
Tony Morris
ht
nub . concat ?
Richard O'Keefe wrote:
>
> On 14 Jun 2009, at 8:06 pm, Fernan Bolando wrote:
>
>> Hi all
>>
>> If I have a number of list
>> example
>> list1 = [2,3]
>> list2 = [1,2]
>> list3 = [2,3,4]
>> list4 = [1,2,3]
>>
>> I want to create a list from the list above with n elements,
>> non-repe
On 14 Jun 2009, at 8:06 pm, Fernan Bolando wrote:
Hi all
If I have a number of list
example
list1 = [2,3]
list2 = [1,2]
list3 = [2,3,4]
list4 = [1,2,3]
I want to create a list from the list above with n elements,
non-repeating and each elements index represents 1 of the elements
from the corr
ghci> map reverse $ foldM (\answer list -> [x:answer | x <- list, not
$ x `elem` answer]) [] [[2,3], [1,2], [2,3,4], [1,2,3]]
[[2,1,4,3],[3,1,4,2],[3,2,4,1]]
On 14 Jun 2009, at 12:06, Fernan Bolando wrote:
Hi all
If I have a number of list
example
list1 = [2,3]
list2 = [1,2]
list3 = [2,3,4]
On Sun, Jun 14, 2009 at 4:13 PM, Erik de Castro
Lopo wrote:
> Fernan Bolando wrote:
>
>> Hi all
>>
>> If I have a number of list
>> example
>> list1 = [2,3]
>> list2 = [1,2]
>> list3 = [2,3,4]
>> list4 = [1,2,3]
>>
>> I want to create a list from the list above with n elements,
>> non-repeating and
Fernan Bolando wrote:
> Hi all
>
> If I have a number of list
> example
> list1 = [2,3]
> list2 = [1,2]
> list3 = [2,3,4]
> list4 = [1,2,3]
>
> I want to create a list from the list above with n elements,
> non-repeating and each elements index represents 1 of the elements
> from the correspondi
Hi all
If I have a number of list
example
list1 = [2,3]
list2 = [1,2]
list3 = [2,3,4]
list4 = [1,2,3]
I want to create a list from the list above with n elements,
non-repeating and each elements index represents 1 of the elements
from the corresponding list so for the above input I would get.
a