home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / function / 1350 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.2 KB  |  45 lines

  1. Newsgroups: comp.lang.functional
  2. Path: sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!erix.ericsson.se!joe
  3. From: joe@erix.ericsson.se (Joe Armstrong)
  4. Subject: Re: Is efficient backtracking feasible in functional languages?
  5. Message-ID: <1992Nov11.171742.18783@eua.ericsson.se>
  6. Sender: news@eua.ericsson.se
  7. Nntp-Posting-Host: gordons.eua.ericsson.se
  8. Nntp-Posting-User: joe
  9. Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
  10. References: <1992Nov10.164456.18062@email.tuwien.ac.at> <TMB.92Nov11104119@arolla.idiap.ch>
  11. Date: Wed, 11 Nov 1992 17:17:42 GMT
  12. Lines: 31
  13.  
  14.  
  15. |> 
  16. |>    strangesucc n =    hd [x|x<-[0..];x>n];
  17. |> 
  18.     ....
  19. |> 
  20. |>   - Stream.head(Stream.filter(fn x => x > 1000000,Stream.iota()));
  21. |>   
  22. |>   [Major collection... 21% used (3397260/15733684), 1920 msec]
  23. |>   
  24. |>   [Major collection... 21% used (3397288/15730836), 1910 msec]
  25. |>   
  26. |>   [Major collection... 21% used (3397288/15730948), 1920 msec]
  27. |>   
  28. |>   [Major collection... 21% used (3397288/15730888), 1920 msec]
  29. |>   
  30. |>   [Major collection... 21% used (3397288/15730888), 1910 msec]
  31. |>   val it = 1000001 : int
  32. |>   -
  33.  
  34.     Wonderfull  !!
  35.  
  36.     This is the kind of stuff that gives FP a bad name :-)
  37.  
  38.     Is their a transformation system which can prove that
  39.  
  40.     strangesucc x == x + 1 ?
  41.  
  42.     Joe
  43.  
  44.  
  45.