Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Sampling the length of 100 generated values of different types
  2.  
  3. ; strings
  4. (map (comp count name first) (s/exercise string? 100))
  5. ;=> (0 0 1 0 3 5 4 5 4 9 2 4 1 12 10 8 10 13 5 9 12 12 1 4 23 25 11 5 0 2 18 30 15 30 12 20 28 2 27 31 0 38 20 41 36 32 8 42 3 3 25 48 7 35 27 14 2 38 31 52 29 59 12 16 43 17 62 45 38 8 1 9 59 36 40 44 70 67 78 47 52 26 25 70 63 43 41 57 75 60 76 60 76 32 42 14 30 5 28 95)
  6. ; reasonable
  7.  
  8. ; names of keywords
  9. (map (comp count name first) (s/exercise keyword? 100))
  10. ;=> (1 2 1 1 2 1 7 4 8 9 11 12 1 3 5 8 17 17 16 13 6 17 9 3 10 5 20 21 18 20 3 15 25 16 19 30 4 37 34 27 2 33 22 9 41 34 40 22 33 8 23 52 10 22 45 31 15 48 6 36 44 45 59 23 2 27 7 25 43 52 59 48 30 11 20 16 61 54 10 79 65 9 44 44 17 35 21 49 80 62 11 46 79 79 68 62 18 71 81 18)
  11. ; reasonable
  12.  
  13. ; names of simple keywords (empty namespace)
  14. (map (comp count name first) (s/exercise simple-keyword? 100))
  15. ;=> (1 1 4 7 13 20 14 15 6 43 60 56 79 71 68 4 32 55 63 89 144 159 128 217 302 138 375 19 24 192 98 91 350 249 275 407 376 644 271 279 22 581 691 1005 168 532 666 928 45 613 653 543 970 840 1507 1194 939 1529 229 290 882 1227 393 805 1797 238 1308 1920 1077 1530 2159 1017 983 93 2417 2691 2597 2921 2303 1603 1888 1633 1197 1803 225 3441 1941 3083 3213 1861 3090 141 1125 2275 357 4577 1703 3423 172 849)
  16. ; after the initial few most keywords are 1000+ long
  17.  
  18. ; namespaces of keywords
  19. (map (comp count namespace first) (s/exercise keyword? 100))
  20. ;=> (0 0 0 4 3 12 24 6 9 7 31 61 55 75 96 120 55 170 98 81 164 30 80 63 38 7 5 36 288 281 175 358 279 248 0 500 379 168 643 293 438 338 752 459 840 1119 732 999 531 374 1090 363 562 1144 952 1395 340 1404 386 1436 1323 204 549 1474 1846 1300 1461 1608 53 49 2597 1417 1886 75 1162 388 424 2428 1456 565 1092 1534 2798 2227 1449 3883 2721 485 2480 2770 224 1349 422 1380 3924 1506 4402 3013 3860 1248)
  21. ; same generator as previous, so many 1000+ length namespaces don't seem reasonable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement