Changeset 12953 in project


Ignore:
Timestamp:
01/07/09 20:04:53 (11 years ago)
Author:
sjamaan
Message:

Simplify by replacing cut/cute with lambda, remove unused non-strict-relative-to

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/uri-generic/trunk/uri-generic.scm

    r12923 r12953  
    306306  (let ((cs (char-set-union char-set:uri-unreserved (char-set #\/))))
    307307    (match pcl
    308            (('/ . rst) (cons '/ (map (compose uri-char-list->string (cute pct-decode <> cs)) rst)))
    309            (else (map (compose uri-char-list->string (cute pct-decode <> cs)) pcl)))))
     308           (('/ . rst) (cons '/ (map (lambda (c)
     309                                       (uri-char-list->string (pct-decode c cs)))
     310                                     rst)))
     311           (else (map (lambda (c)
     312                        (uri-char-list->string (pct-decode c cs)))
     313                      pcl)))))
    310314
    311315(define (hier-part s)
     
    819823;;         => "http://bar.org/foo"
    820824;;
    821 ;;  (uri->string (non-strict-relative-to (uri "http:foo") (uri "http://bar.org/")) )
    822 ;;         => "http://bar.org/foo"
    823 ;;
    824825;;  Algorithm from RFC3986, section 5.2.2
    825826;;
     
    867868      (remove-dot-segments mp))))
    868869
    869 (define (uri-non-strict-relative-to ref base)
    870   (let ((rs (uri-scheme ref))
    871         (rb (uri-scheme base)))
    872     (let ((ref1 (update-URI ref scheme: (if (eq? rs rb) #f (uri-scheme ref)))))
    873       (uri-relative-to ref1 base))))
    874 
    875 
    876870;;  Remove dot segments, but protect leading '/' character
    877871
Note: See TracChangeset for help on using the changeset viewer.