Browse thread
Snd question
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Julian Brown <brown@c...> |
| Subject: | Re: Snd question |
On 2005-08-16, skaller <skaller@users.sourceforge.net> wrote: > > --===============0107267212== > Content-Type: multipart/signed; micalg=pgp-sha1; > protocol="application/pgp-signature"; > boundary="=-5lbpy9BGwsstOd4gLrxM" > > > --=-5lbpy9BGwsstOd4gLrxM > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: quoted-printable > > On Mon, 2005-08-15 at 16:41 -0600, Matt Gushee wrote: >> Anu Engineer wrote: >>=20 >> > Please forgive me if my question is very na=C3=AFve, I am very new to=20 >> Ocaml. I was >>=20 >> > wondering why snd returns an error when I use it with more than 2=20 >> elements, why >>=20 >> > not return the rest of the list when I apply to something larger than=20 >> a pair ? >>=20 >>=20 >> Your question shows your misunderstanding: snd operates on tuples, not=20 >> lists.=20 > > I think the original question really meant: > > Why aren't "fst" and "snd" properly generic?? > > For example this simply *should* work: > > snd (1,2,3) What's wrong with arrays (or lists, for that matter), if you want to do this type of operation? Julian