Commits

certainty  committed 47bce45

simplified ipv4 generator

  • Participants
  • Parent commits e454a86

Comments (0)

Files changed (2)

File data-generators-net.scm

   (import chicken scheme)
   (require-library data-generators srfi-13)
   (import (only srfi-13 string-join))
-  (import (only data-generators gen-tuple-of gen-uint8 gen-transform))
+  (import (only data-generators gen-list-of gen-uint8 gen-transform))
 
   (define (gen-ipv4-address)
     (let ((octet-gen (gen-transform number->string (gen-uint8))))
-      (gen-transform (cut string-join <> ".") (gen-tuple-of octet-gen octet-gen octet-gen octet-gen)))))
+      (gen-transform (cut string-join <> ".") (gen-list-of octet-gen 4)))))

File data-generators.scm

        (only data-structures o)
        srfi-14 srfi-69 numbers)
 
-  (include "data-generators-impl.scm")
-
-  )
+  (include "data-generators-impl.scm"))