Sha256: eb95a07ce021a83ada3dc577c935ba98d917d19640ab6858e9e2864970abb069

Contents?: true

Size: 819 Bytes

Versions: 14

Compression:

Stored size: 819 Bytes

Contents

(define depth'
  {A --> (A --> (list A)) --> (A --> boolean) --> (A --> boolean) --> (list A)}
  State Successors Goal? Fail? -> (depth-help' [State] Successors Goal? Fail? []))

(define depth-help'
  {(list A) --> (A --> (list A)) --> (A --> boolean) --> (A --> boolean) --> (list A) --> (list A)}
  [State | _] _ Goal? _ Path -> (reverse [State | Path]) 	where (Goal? State)
  [State | _] _ _ Fail? _ -> [] 				where (Fail? State)
  [State | _] Successors Goal? Fail? Path <- (fail-if empty? 
                                                      (depth-help' (Successors State) 
                                                                   Successors Goal? Fail? [State | Path]))
  [_ | States] Successors Goal? Fail? Path -> (depth-help' States Successors Goal? Fail? Path)
  _ _ _ _ _ -> []) 

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shen-ruby-0.13.0 shen/release/test_programs/depth_.shen
shen-ruby-0.10.0 shen/release/test_programs/depth_.shen
shen-ruby-0.9.0 shen/release/test_programs/depth_.shen
shen-ruby-0.8.1 shen/release/test_programs/depth_.shen
shen-ruby-0.8.0 shen/release/test_programs/depth_.shen
shen-ruby-0.7.0 shen/release/test_programs/depth_.shen
shen-ruby-0.6.0 shen/release/test_programs/depth_.shen
shen-ruby-0.5.0 shen/release/test_programs/depth_.shen
shen-ruby-0.4.1 shen/release/test_programs/depth_.shen
shen-ruby-0.4.0 shen/release/test_programs/depth_.shen
shen-ruby-0.3.1 shen/release/test_programs/depth_.shen
shen-ruby-0.3.0 shen/release/test_programs/depth_.shen
shen-ruby-0.2.0 shen/release/test_programs/depth_.shen
shen-ruby-0.1.0 shen/release/test_programs/depth_.shen