iloveponies / structured-data

17 stars 1.38k forks source link

Problem with the Exercise 29 #1068

Open leolamping opened 7 years ago

leolamping commented 7 years ago

Hi there! I'm having a issue with the test for the Exercise 29. Look at the result of the test (lein midje):

FAIL "books->string" at (structured_data.clj:317) Expected: #"3 books. The Little Schemer, written by (Daniel Friedman (1944 - ), Matthias Felleisen|Matthias Felleisen, Daniel Friedman (1944 - )). The City and the City, written by China Miéville (1972 - ). Wild Seed, written by Octavia E. Butler (1947 - 2006)."

Comparing with the result in the article:

(books->string [little-schemer, cities, wild-seed]) ;=> "3 books. The Little Schemer, written by Daniel Friedman (1944 - ), Matthias Felleisen. The City and the City, written by China Miéville (1972 - ). Wild Seed, written by Octavia E. Butler (1947 - 2006)."

mtpabis commented 7 years ago

Had a problem with this too, but it turned out i missed the ending period (".").

This #"(...)|(...)" string just contains escape characters (e.g. "(") and alternative sign ("|") to allow different solutions (the ones with different ordering).