pull/9/head
Matthew Butterick 11 years ago
parent 8b0de59142
commit ebfe5aa8e3

@ -212,6 +212,15 @@
(ormap (λ(proc) (proc (->path x))) (list pollen-source? has-pollen-source?)))
(define/contract (ptree-source? x)
(any/c . -> . boolean?)
((->path x) . has-ext? . PTREE_SOURCE_EXT))
(module+ test
(check-true (ptree-source? (format "foo.~a" PTREE_SOURCE_EXT)))
(check-false (ptree-source? (format "~a.foo" PTREE_SOURCE_EXT))))
(define/contract (pollen-source? x)
(any/c . -> . boolean?)

@ -4,15 +4,7 @@
(module+ test (require rackunit))
(provide pnode? ptree? ptree-source? parent children previous next pnode->url ptree-source-decode path->pnode ptree->list file->ptree make-project-ptree current-ptree current-url-context)
(define/contract (ptree-source? x)
(any/c . -> . boolean?)
((->path x) . has-ext? . PTREE_SOURCE_EXT))
(module+ test
(check-true (ptree-source? (format "foo.~a" PTREE_SOURCE_EXT)))
(check-false (ptree-source? (format "~a.foo" PTREE_SOURCE_EXT))))
(provide pnode? ptree? parent children previous next pnode->url ptree-source-decode path->pnode ptree->list file->ptree make-project-ptree current-ptree current-url-context)
(define/contract (pnode? x)
(any/c . -> . boolean?)

Loading…
Cancel
Save