List Info

Thread: "ocaml_beginners"::[] null?




"ocaml_beginners"::[] null?
user name
2006-11-12 18:08:35

I'm curious why SML of NJ includes a null function as
part of its List module but OCaml left it out. I know
its usage has been marginalized by pattern matching
but the same could have been said for ML.

--mr

__________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

__._,_.___
.

__,_._,___
"ocaml_beginners"::[] null?
user name
2006-11-12 21:25:34

On Sun, 12 Nov 2006, michael rice wrote:

> I'm curious why SML of NJ includes a null function as
> part of its List module but OCaml left it out. I know
> its usage has been marginalized by pattern matching
> but the same could have been said for ML.

It doesn't seem to be very useful. Just do that:
if l = [] then ...
else ...

Martin

--
Martin Jambon, PhD
http://martin.jambon.free.fr

Ce message est confidentiel. Merci !
This message is confidential. Thanks!

__._,_.___
.

__,_._,___
"ocaml_beginners"::[] null?
user name
2006-11-12 21:46:31

On Sun, Nov 12, 2006 at 01:25:34PM -0800, Martin Jambon wrote:
> On Sun, 12 Nov 2006, michael rice wrote:
>
> > I'm curious why SML of NJ includes a null function as
> > part of its List module but OCaml left it out. I know
> > its usage has been marginalized by pattern matching
> > but the same could have been said for ML.
>
> It doesn't seem to be very useful. Just do that:
>; if l = [] then ...
> else ...
>
[...]

Doing some OO-wrapping around this, it maybe useful for
a lot of people

Ciao,
Oliver

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )