Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] Diff of /sml/trunk/src/smlnj-lib/Util/prime-sizes.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/Util/prime-sizes.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1333, Thu May 22 17:12:13 2003 UTC revision 1334, Thu May 22 22:46:30 2003 UTC
# Line 26  Line 26 
26            ]            ]
27    
28      fun pick i = let      fun pick i = let
29            fun f [(p, _)] = p            fun f [] = raise Fail "PrimeSizes.pick: out of sequences"
30                | f [(p, _)] = p
31              | f ((hi, l)::r) = if (i < hi) then g l else f r              | f ((hi, l)::r) = if (i < hi) then g l else f r
32            and g [p] = p            and g [] = raise Fail "PrimeSizes.pick: out of primes in sequence"
33                | g [p] = p
34              | g (p::r) = if (i < p) then p else g r              | g (p::r) = if (i < p) then p else g r
35            in            in
36              f primes              f primes

Legend:
Removed from v.1333  
changed lines
  Added in v.1334

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0