## Paticia's Profile User Rating:

Reputation: 0 Apprentice
Group:
Members
Active Posts:
19 (0.03 per day)
Joined:
01-December 11
Profile Views:
362
Last Active:
Nov 08 2012 03:39 PM
Currently:
Offline

### Previous Fields

Country:
PT
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
Who Cares
Volkswagen
Dream Kudos:
0
Paticia has not set their status

1. #### In Topic: Email issue

Posted 2 Aug 2012

DarenR, on 02 August 2012 - 05:21 AM, said:

are you allowing this ip to come through your firewall?

I can access perfectly others email accounts with the same domain from my computer. So, I believe that there's no problem with the firewall.

Posted 12 Dec 2011

Paticia, on 11 December 2011 - 10:08 PM, said:

After that I've tried I've almost everything that I can remember. I believe that my best approach was something like:

```xxs = [(11,22,[(33,33,33),(44,44,44)]),(55,66,[(77,77,77),(88,88,88)])]
foo [] _ _ _ = error "-.-/>"
foo ((x1:x2:x3):xs) 1 1 y = (x1:x2:y): xs  -- I'm sure that there is some errors
foo (xa:xb:xc:xs) n  p y = xa:xb:((foo xc (p-1) y): (xs (n-1))) --  wont compile ://>
```

Posted 11 Dec 2011

well sepp2k, let me just say that if you're not a teacher... you should considerate that!
Thanks you very much!

But now... you just made me review my full assignment! lol

So, one more question. If I have:
```xs = [(11,22,[(33,33,33),(44,44,44)]),(55,66,[(77,77,77),(88,88,88)])]
```

Can I use constructors to pattern match the lists of tuples inside the tuples from the xs list?
I.e. can I "replace" the nth tuple from the xs list (33,33,33)or(44,44,44) or (77,77,77)or (88,88,88)? I've try to do that, but without success.

Based on your post, I'm now able to change the tuples of a list of tuples:
```xxs = [(11,11,11),(11,11,11),(11,11,11)]
foo [] _ _ = error "List does not have enough elements"
foo ((x1):xs) 1 y = (y) : xs
foo (x:xs) n y = x : (foo xs (n-1) y)
```

After that I've tried I've almost everything that I can remember. I believe that my best approach was something like: foo = (x1:x2:x3:xs) n p y = x1:x2:y: xs

I've tried for hours... And I didnt even know if it's possible! :S

Posted 11 Dec 2011

sepp2k, on 11 December 2011 - 07:45 AM, said:

You should rewrite that function so it can handle lists of any length.

That is my biggest problem, since the beginning. My codes works fine for smaller lists (like my 2 or 3 restaurants)... but if I have a longer list (like 100 or 200 restaurants)?

From your response, I assume that there's a way to "handle lists of any length". Am I far away from achieve it?

ty.

Posted 11 Dec 2011

@ishkabible
ty for yours suggestions.

About "code 2" ... I've only tried it because... well, more for study. with a small list, it could be nice, but I really agree: this code also make my "eyes bleed".

The "code 3" was initially something like:
```foo x y ((_,_,z):xxs) = (x,y,z):xxs
```

but i didnt wanna pass a list as argument. So, I create an aux function.

About the use of tuples, unfortunately it's an assignment requirement.

All the other ideas... I'll add them!!

Thank you very much!

### My Information

Member Title:
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Portugal
Years Programming:
0

E-mail:
Private