picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

travel.l (1296B)


      1 # 22oct03abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 (de travel (A B)
      5    (mini car
      6       (solve
      7          (quote
      8             @A A
      9             @B B
     10             (path @A @B @P @N) )
     11          (cons @N @P) ) ) )
     12 
     13 
     14 (be path (@A @B @P @N) (path1 @A @B (@A) @P @N))
     15 
     16 (be path1 (@A @A @L (@A) 0))
     17 (be path1 (@A @B @L (@A . @P) @N)
     18    (edge @A @Z @X)
     19    (not (member @Z @L))
     20    (path1 @Z @B (@Z . @L) @P @Y)
     21    (@N + (-> @X) (-> @Y)) )
     22 
     23 (be edge (@A @B @N) (vect @A @B @N))
     24 (be edge (@A @B @N) (vect @B @A @N))
     25 
     26 (be vect (Rheine Muenster 39))
     27 (be vect (Rheine Osnabrueck 42))
     28 (be vect (Muenster Osnabrueck 51))
     29 (be vect (Warendorf Muenster 28))
     30 (be vect (Warendorf Osnabrueck 43))
     31 (be vect (Warendorf Rheda 24))
     32 (be vect (Warendorf Guetersloh 27))
     33 (be vect (Osnabrueck Bielefeld 48))
     34 (be vect (Rheda Guetersloh 10))
     35 (be vect (Bielefeld Guetersloh 16))
     36 (be vect (Bielefeld Paderborn 39))
     37 (be vect (Paderborn Guetersloh 31))
     38 (be vect (Paderborn Rheda 32))
     39 (be vect (Paderborn Soest 41))
     40 (be vect (Soest Rheda 38))
     41 (be vect (Soest Beckum 26))
     42 (be vect (Beckum Rheda 24))
     43 (be vect (Beckum Warendorf 27))
     44 (be vect (Ahlen Warendorf 27))
     45 (be vect (Ahlen Muenster 46))
     46 (be vect (Ahlen Beckum 11))
     47 (be vect (Ahlen Soest 27))
     48 
     49 (test
     50    '(123 Rheine Muenster Warendorf Rheda Paderborn)
     51    (travel 'Rheine 'Paderborn) )