Sha256: ab53fd99e5267418d0e877015c48bc26fee34bf564b8744bcd02085a3fcb6c0b

Contents?: true

Size: 259 Bytes

Versions: 3

Compression:

Stored size: 259 Bytes

Contents

(define cartesian-product 
   [ ] _ -> [ ]  
   [X | Y] Z -> (append (all-pairs-using-X X Z) (cartesian-product Y Z)))

(define all-pairs-using-X 
   _ [ ] -> [ ] 
   X [Y | Z] -> [[X Y] | (all-pairs-using-X X Z)]) 
   

   
    
      
    
      







 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shen-ruby-0.12.1 shen/release/test_programs/cartprod.shen
shen-ruby-0.12.0 shen/release/test_programs/cartprod.shen
shen-ruby-0.11.0 shen/release/test_programs/cartprod.shen