Article View: comp.lang.functional
Article #566Re: Is efficient backtracking feasible in functional languages?
From: Joe Armstrong
Date: Wed, 11 Nov 1992 17:17
Date: Wed, 11 Nov 1992 17:17
29 lines
1307 bytes
1307 bytes
|> |> strangesucc n = hd [x|x<-[0..];x>n]; |> .... |> |> - Stream.head(Stream.filter(fn x => x > 1000000,Stream.iota())); |> |> [Major collection... 21% used (3397260/15733684), 1920 msec] |> |> [Major collection... 21% used (3397288/15730836), 1910 msec] |> |> [Major collection... 21% used (3397288/15730948), 1920 msec] |> |> [Major collection... 21% used (3397288/15730888), 1920 msec] |> |> [Major collection... 21% used (3397288/15730888), 1910 msec] |> val it = 1000001 : int |> - Wonderfull !! This is the kind of stuff that gives FP a bad name :-) Is their a transformation system which can prove that strangesucc x == x + 1 ? Joe
Technical Details
Message-ID:
<1992Nov11.171742.18783@eua.ericsson.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!erix.ericsson.se!joeReferences:
<1992Nov10.164456.18062@email.tuwien.ac.at> <TMB.92Nov11104119@arolla.idiap.ch>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.functional Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!erix.ericsson.se!joe From: joe@erix.ericsson.se (Joe Armstrong) Subject: Re: Is efficient backtracking feasible in functional languages? Message-ID: <1992Nov11.171742.18783@eua.ericsson.se> Sender: news@eua.ericsson.se Nntp-Posting-Host: gordons.eua.ericsson.se Nntp-Posting-User: joe Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden References: <1992Nov10.164456.18062@email.tuwien.ac.at> <TMB.92Nov11104119@arolla.idiap.ch> Date: Wed, 11 Nov 1992 17:17:42 GMT Lines: 31