Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 3491 lines (2930 sloc) 113.782 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title><b>An Introduction to EuLisp, EuXLisp and Youtoo</b></title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2011-02-27 17:11:53 GMT"/>
<meta name="author" content="of original Euscheme notes Russell Bradford"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  html { font-family: Times, serif; font-size: 12pt; }
  .title { text-align: center; }
  .todo { color: red; }
  .done { color: green; }
  .tag { background-color: #add8e6; font-weight:normal }
  .target { }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  p.verse { margin-left: 3% }
  pre {
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
font-family: courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top; }
  dt { font-weight: bold; }
  div.figure { padding: 0.5em; }
  div.figure p { text-align: center; }
  .linenr { font-size:smaller }
  .code-highlighted {background-color:#ffff00;}
  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }
  /*]]>*/-->
</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="content">

<h1 class="title"><b>An Introduction to EuLisp, EuXLisp and Youtoo</b></h1>


<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 EuLisp index </a></li>
<li><a href="#sec-2">2 Introduction </a></li>
<li><a href="#sec-3">3 Running EuXLisp </a></li>
<li><a href="#sec-4">4 Running Youtoo </a></li>
<li><a href="#sec-5">5 Constants </a></li>
<li><a href="#sec-6">6 Lists and Vectors </a></li>
<li><a href="#sec-7">7 Expressions </a></li>
<li><a href="#sec-8">8 Conditionals </a></li>
<li><a href="#sec-9">9 Assignment </a></li>
<li><a href="#sec-10">10 Defining Functions </a></li>
<li><a href="#sec-11">11 Arithmetic </a></li>
<li><a href="#sec-12">12 Modules </a></li>
<li><a href="#sec-13">13 Errors and the Debug Loop </a></li>
<li><a href="#sec-14">14 Classes and Generic Functions </a></li>
<li><a href="#sec-15">15 Threads </a></li>
<li><a href="#sec-16">16 Input and Output </a></li>
<li><a href="#sec-17">17 Defining Syntax </a></li>
<li><a href="#sec-18">18 Miscellany </a></li>
<li><a href="#sec-19">19 Example Modules </a></li>
<li><a href="#sec-20">20 EuLisp functions </a></li>
<li><a href="#sec-21">21 EuXLisp functions </a></li>
<li><a href="#sec-22">22 Command Line Arguments </a></li>
<li><a href="#sec-23">23 Shell Scripts </a></li>
</ul>
</div>
</div>

<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> <a href="../index.html">EuLisp index</a> </h2>
<div class="outline-text-2" id="text-1">

</div>

</div>

<div id="outline-container-2" class="outline-2">
<h2 id="sec-2"><span class="section-number-2">2</span> Introduction </h2>
<div class="outline-text-2" id="text-2">

<p>This introduction to EuLisp is based on the
<a href="http://people.bath.ac.uk/masrjb/Sources/eunotes.html">Euscheme notes</a>
written by Russell Bradford. Much of the text remains more or less unchanged
but reformatted in Org-mode and exported as HTML. Also some changes
have been made and continue to be made to keep this document consistent with
the evolving EuLisp definition and EuXLisp and Youtoo implementations.
</p>
<p>
EuXLisp is a simple EuLisp Level 0 interpreter. EuLisp Level 0 is a small and
compact Lisp, but nevertheless has many interesting features, such as modules,
an object system, and multithreading. EuLisp Level 1 has extra features, the
most notable being a full metaobject system which are implemented in Youtoo.
This introduction to EuLisp using EuXLisp and Youtoo concentrates on those
things unique to EuLisp rather than covering basic Lisp concepts which are
already covered well in many texts.
</p>
</div>

</div>

<div id="outline-container-3" class="outline-2">
<h2 id="sec-3"><span class="section-number-2">3</span> Running EuXLisp </h2>
<div class="outline-text-2" id="text-3">

<ul>
<li id="sec-3.1"><a href="./euxlisp.html">Man page</a> <br/>
<ul>
<li>
<a href="./euxlisp.html">EuXLisp man page (HTML)</a>
</li>
<li>
<a href="./euxlisp.1">EuXLisp man page (ASCII)</a>
</li>
</ul>
</li>
<li id="sec-3.2">Setting environment variables <br/>
EuXLisp need two paths: where to look for the compiled image, and where to
look for modules to load:
<ul>
<li id="sec-3.2.1">Image <br/>
First euxlisp checks the environment variable <code>EU_IMAGE_PATH</code> (a colon
separated list of directory names), then a builtin path, set from
<code>IMAGE_SEARCH_PATH</code> in the Makefile.
</li>
<li id="sec-3.2.2">Modules <br/>
ditto for environment variable <code>EU_MODULE_PATH</code>, then builtin
<code>MODULE_SEARCH_PATH</code> (e.g., you might want to provide a set of system
supplied modules).
</li>
<li id="sec-3.2.3">Default settings <br/>
The default built-in settings should work for a default build with the
files in their default locations.
</li>
</ul>
</li>
<li id="sec-3.3">Running Interactively <br/>
type
<ul>
<li>
<code>Bin.${ARCH}/euxlisp</code>
</li>
</ul>

<p>without options to start the EuXLisp interpreter which will print the banner
and prompt:
</p>


<pre class="src src-eulisp"><span style="color: #000000;">EuXLisp</span> (<span style="color: #0000ff; font-weight: bold;">formally</span> <span style="color: #000000;">EuScheme</span>) - <span style="color: #000000;">Version</span> 0.991
<span style="color: #000000;">Reading</span> readline history from ${<span style="color: #000000;">HOME</span>}/.eulisp_history

user&gt;
</pre>



<p>
where the final line is the prompt. EuXLisp uses the usual read-eval-print
cycle of interactive Lisps: type something, it will be evaluated, and the
result printed. To exit, use
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(exit</span>)
</pre>



<p>
and (usually) ^D will work, too.
</p></li>
<li id="sec-3.4">Executing a module <br/>
To execute the module <code>fact</code> in file <code>fact.em</code> run
<ul>
<li>
<code>echo "(!&gt; fact)" | ../../Bin.${ARCH}/euxlisp -q</code>
</li>
</ul>

<p>The <code>echo</code> pipes the load module <code>!&gt;</code> command to the interpreter. In the
future there will be a command-line option to execute a module directly.
</p>
</li>
</ul>
</div>

</div>

<div id="outline-container-4" class="outline-2">
<h2 id="sec-4"><span class="section-number-2">4</span> Running Youtoo </h2>
<div class="outline-text-2" id="text-4">

<ul>
<li id="sec-4.1">Options <br/>
to see the command-line options type



<pre class="src src-eulisp"><span style="color: #000000;">Bin.x86_64/youtoo</span> --help
<span style="color: #000000;">Usage:</span> youtoo [<span style="color: #000000;">OPTION</span>]... [<span style="color: #000000;">FILE</span>]...
  -h --help <span style="color: #000000;">Print</span> this usage information.
  -V --version <span style="color: #000000;">Print</span> current release.
  -p --params <span style="color: #000000;">Print</span> current parameter setting.
     --load-path dir <span style="color: #000000;">Add</span> dir to load path.
  -c --c-module <span style="color: #000000;">Create</span> <span style="color: #000000;">C</span> linkable module file only.
     --stand-alone <span style="color: #000000;">Create</span> a stand-alone application.
     --archive <span style="color: #000000;">Create</span> <span style="color: #000000;">C</span> linkable library file.
  -l --library lib <span style="color: #000000;">Link</span> with library lib.
  -L --library-path dir <span style="color: #000000;">Add</span> dir to library load path.
     --fff file <span style="color: #000000;">Provide</span> <span style="color: #000000;">C</span> foreign function file.
     --ffl lib <span style="color: #000000;">Provide</span> <span style="color: #000000;">C</span> foreign function library lib.
  -o --object file <span style="color: #000000;">Generated</span> object file.
  -O --object-dir dir <span style="color: #000000;">Set</span> destination directory for object files to dir.
  -s --script file <span style="color: #000000;">Read</span> and execute script from file.
  -m --module module-name <span style="color: #000000;">Read</span> and execute module from file module-name.em.
  -q --quiet <span style="color: #000000;">Print</span> no messages, prompts or values..
  -v --verbose <span style="color: #000000;">Set</span> verbose mode.
     --no-warnings <span style="color: #000000;">Set</span> no warning messages.
     --no-errors <span style="color: #000000;">Set</span> no <span style="font-weight: bold;">error messages.</span>
     --no-else <span style="color: #000000;">Set</span> no warning for if without else.
     --redefine <span style="color: #000000;">Redefine</span> imported bindings.
     --no-inline <span style="color: #000000;">Ignore</span> inline declarations.
     --stop-after phase <span style="color: #000000;">Stop</span> after specified compilation phase (<span style="color: #0000ff; font-weight: bold;">e.g.</span> read).
     --recompile <span style="color: #000000;">Recompile</span> imported modules.
     --no-recompile <span style="color: #000000;">No</span> automatic recompilation of imports.
     --no-gc <span style="color: #000000;">Link</span> without garbage collection library.
     --cc cc <span style="color: #000000;">Set</span> <span style="color: #000000;">C</span> compiler to cc.
     --ld ld <span style="color: #000000;">Set</span> <span style="color: #000000;">C</span> linker to ld.
     --ar-cmd ar <span style="color: #000000;">Set</span> <span style="color: #000000;">C</span> ar command to ar.
     --ranlib-cmd ranlib <span style="color: #000000;">Set</span> <span style="color: #000000;">C</span> ranlib command to ranlib.
     --cflags <span style="color: #000000;">Set</span> ddditional <span style="color: #000000;">C</span> flags.
     --static <span style="color: #000000;">Link</span> with static libraries.
  -g --debug <span style="color: #000000;">Generate</span> <span style="color: #000000;">C</span> debug information.
  -i --interpret <span style="color: #000000;">Set</span> interpretation mode.
     --no-ct-handlers <span style="color: #000000;">Set</span> no compile-time <span style="font-weight: bold;">error handling.</span>
</pre>



</li>
<li id="sec-4.2">Running Interactively <br/>
type
<ul>
<li>
<code>Bin.${ARCH}/youtoo</code>
</li>
</ul>

<p>which will print the banner and prompt:
</p>


<pre class="src src-eulisp"><span style="color: #000000;">EuLisp</span> <span style="color: #000000;">System</span> <span style="color: #000000;">Youtoo</span> - <span style="color: #000000;">Version</span> 0.991'
<span style="color: #000000;">Reading</span> readline history from ${<span style="color: #000000;">HOME</span>}/.eulisp_history

user&gt;
</pre>



<p>
where the final line is the prompt. Youtoo uses the usual read-eval-print
cycle of interactive Lisps: type something, it will be evaluated, and the
result printed. For help type
</p>


<pre class="src src-eulisp">user&gt; help:
load: <span style="color: #0000ff;">&lt;file-name&gt;</span> evaluate file expressions
? previous value
lexical-bindings: show lexical environment
verbose: run verbose
silent: run silent
trace: <span style="color: #0000ff;">&lt;function-name&gt;</span> trace function invocation
untrace: <span style="color: #0000ff;">&lt;functon-name&gt;</span> stop tracing function invocation
backtrace: show backtrace
values: show stack values
continue: continue computation
reset: resume from all errors
resume: resume from previous <span style="font-weight: bold;">error</span>
[<span style="color: #000000;">Ctrl-d</span>] exit interpreter or resume from previous <span style="font-weight: bold;">error</span>
[<span style="color: #000000;">Ctrl-c</span>] interrupt computation
[<span style="color: #000000;">Ctrl-z</span>] suspend interpreter
exit: exit interpreter
-&gt; #&lt;file-stream: stdout&gt;
user&gt;
</pre>



<p>
to exit type
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(exit</span>)
</pre>



</li>
<li id="sec-4.3">Compiling <br/>
In directory <code>Examples/Misc</code> run
<ul>
<li>
<code>Bin.${ARCH}/youtoo fact -l level-1</code>
</li>
</ul>

<p>to compile module fact into a stand-alone executable. With shared libraries
the executable should be less the 40K.
</p></li>
<li id="sec-4.4"><a href="../Youtoo/README.html">See also</a> <br/>
<a href="../Youtoo/README.html">Youtoo README</a>

</li>
</ul>
</div>

</div>

<div id="outline-container-5" class="outline-2">
<h2 id="sec-5"><span class="section-number-2">5</span> Constants </h2>
<div class="outline-text-2" id="text-5">

<p>There are the usual self-evaluating bits and pieces:
</p><ul>
<li>
strings: in double quotes "hello"
</li>
<li>
numbers: integers and floating point <code>1234</code> and <code>3.1415</code>
</li>
<li>
characters: preceded by <code>#\</code> as in <code>#\c</code> for the character 'c'
</li>
<li>
vectors: delimited by <code>#(</code> and <code>)</code> as in <code>#(1 a (3))</code> which is a vector of
length 3, containing an integer, a symbol, and a list.

</li>
</ul>
</div>

</div>

<div id="outline-container-6" class="outline-2">
<h2 id="sec-6"><span class="section-number-2">6</span> Lists and Vectors </h2>
<div class="outline-text-2" id="text-6">

<p>Lists are created with the usual <a href="EuLisp-0.991/html/eulispcl17.html#dx21-630002"><code>cons</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-647002"><code>list</code></a> and quoted forms '(1 2 3).
Use <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a> and <a href="EuLisp-0.991/html/eulispcl17.html#dx21-634002"><code>cdr</code></a> to access the elements.
</p>
<p>
A vector is created by the function <code>make-vector</code> as in
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(make-vector</span> 4)
</pre>



<p>
which creates a vector of length 4, indexed from 0 to 3, all elements
initialised to be <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a>s. In fact, make-vector can take a second argument
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(make-vector</span> 4 0)
</pre>



<p>
which creates a vector as before, with all elements initialised to 0.
</p>
<p>
To access a vector element use <code>(vector-ref vec index)</code>; to update use
<code>((setter vector-ref) vec index newval)</code>. See below for details about the
setter function.
</p>
<p>
Take care with the creation of vectors: <code>(make-vector 3 #(0 0 0))</code> will create
a vector of three slots, all initialised to the same <a href="EuLisp-0.991/html/eulispcl17.html#dx21-437004"><code>eq</code></a> value.
</p>
</div>

</div>

<div id="outline-container-7" class="outline-2">
<h2 id="sec-7"><span class="section-number-2">7</span> Expressions </h2>
<div class="outline-text-2" id="text-7">

<p>As is usual, anything that is not a constant is an expression to be evaluated,
and those things marked by a quote are deemed to be constant. Thus
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(+</span> 1 2)
</pre>



<p>
is an expression to be evaluated, while
</p>


<pre class="src src-eulisp">'<span style="color: #0000ff; font-weight: bold;">(+</span> 1 2)
</pre>




<p>
is a constant list of 3 elements (modifying constant lists has an undefined
effect, so it's best not to do so). EuLisp has both progn to collect together
several expressions into a single expression, and let for the declaration of
local variables.
</p>


<pre class="src src-eulisp">(progn
  expr
  expr
  ...
)
</pre>



<p>
and
</p>


<pre class="src src-eulisp">(let ((<span style="color: #0000ff; font-weight: bold;">var</span> val)
      (<span style="color: #0000ff; font-weight: bold;">var</span> val)
      ...)
  expr
  expr
  ...
)
</pre>



<p>
(Semantics: evaluate all the vals first, then make the bindings to the
corresponding vals. Thus the vals cannot refer to the vars. Use let*
</p>


<pre class="src src-eulisp">(let* ((<span style="color: #0000ff; font-weight: bold;">var1</span> val1)
       (<span style="color: #0000ff; font-weight: bold;">var2</span> val2)
       ...)
  ...)
</pre>



<p>
with semantics of evaluate <code>val1</code>, bind to <code>var1</code>, evaluate <code>val2</code>, bind to
<code>var2</code>, etc., if you need to refer back to previous values.)
</p>
<p>
The values of these expressions are the values of their last exprs. Named
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-289003"><code>let</code></a> and <a href="EuLisp-0.991/html/eulispcl16.html#dx20-292004"><code>let*</code></a> are also supported.
</p>
<p>
Numbers have the usual syntax: <code>123</code>, <code>1.23</code> and <code>1.2e4</code>. Additionally, you
can enter integers in base 2: <code>#b101010</code>, base 8: <code>#o7654</code>, base 16: <code>#x12ab</code>,
and any other base up to 36: <code>#23r12gd</code> for a base 23 integer.
</p>
<p>
The full syntax of symbols is somewhat tricky, but "alphanumerics, starting
with a letter" is certainly OK. Dodgy characters, such as space, or a leading
digit can be escaped with a <code>\</code>. A multiple character escape is introduced
and ended by <code>|</code>. Within the confines of these delimiters any character is
fine, except that <code>\|</code> is interpreted as a literal <code>|</code>, and <code>\\</code> as a literal
<code>\</code>.
</p>
<p>
All the following are the same symbol:
</p>


<pre class="src src-eulisp">\1\ 23
|1 |23
|1 23|
|1 |2|3|
|1 |2\3
\1| |2||3
</pre>



<p>
Their canonical form is <code>|1 23|</code>.
</p>
</div>

</div>

<div id="outline-container-8" class="outline-2">
<h2 id="sec-8"><span class="section-number-2">8</span> Conditionals </h2>
<div class="outline-text-2" id="text-8">

<p>EuLisp has the usual <code>(if boolexpr trueexpr falseexpr)</code> (always with both
trueexpr and falseexpr), and the <a href="EuLisp-0.991/html/eulispcl16.html#dx20-262002"><code>cond</code></a> form. The single false value in
EuLisp is <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a>: anything else is deemed to be true. <a href="EuLisp-0.991/html/eulispcl16.html#dx20-210002"><code>t</code></a> is bound to the
symbol <a href="EuLisp-0.991/html/eulispcl16.html#dx20-210002"><code>t</code></a>, providing a convenient canonical true value. Additional
conditional forms include
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(when</span> boolexpr
   expr
   expr
   ...
)
</pre>



<p>
where the exprs are evaluated when the condition is true and the result of the
last returned otherwise <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a> is returned; and
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(unless</span> boolexpr
   expr
   expr
   ...
)
</pre>



<p>
where the exprs are evaluated when the condition is false and the result of
the last returned otherwise <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a> is returned.
</p>
</div>

</div>

<div id="outline-container-9" class="outline-2">
<h2 id="sec-9"><span class="section-number-2">9</span> Assignment </h2>
<div class="outline-text-2" id="text-9">

<p><a href="EuLisp-0.991/html/eulispcl16.html#dx20-245003"><code>setq</code></a> as usual:
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">setq</span> foo 2)
</pre>




<p>
It's also good to define module-local variables:
</p>


<pre class="src src-eulisp">(deflocal <span style="color: #0000ff;">foo</span> 2)
</pre>



<p>
You can omit the initial value if you want. The <a href="EuLisp-0.991/html/eulispcl16.html#dx20-211007"><code>deflocal</code></a> form should only
be used at the top level (i.e., never inside a function definition or a
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-289003"><code>let</code></a>).
</p>
</div>

</div>

<div id="outline-container-10" class="outline-2">
<h2 id="sec-10"><span class="section-number-2">10</span> Defining Functions </h2>
<div class="outline-text-2" id="text-10">

<p>Here we use defun.
</p>


<pre class="src src-eulisp">(defun <span style="color: #0000ff; font-weight: bold;">len</span> (<span style="color: #0000ff; font-weight: bold;">l</span>)
  (if (<span style="color: #0000ff; font-weight: bold;">null</span> l)
      0
      <span style="color: #0000ff; font-weight: bold;">(+</span> 1 (<span style="color: #0000ff; font-weight: bold;">len</span> <span style="color: #0000ff; font-weight: bold;">(cdr</span> l)))))
</pre>



<p>
EuLisp is fully tail-recursive, so a function written in a tail-recursive way
uses no stack:
</p>


<pre class="src src-eulisp">(defun <span style="color: #0000ff; font-weight: bold;">foo</span> (<span style="color: #0000ff; font-weight: bold;">n</span>)
  <span style="color: #0000ff; font-weight: bold;">(print</span> n)
  (<span style="color: #0000ff; font-weight: bold;">foo</span> <span style="color: #0000ff; font-weight: bold;">(+</span> n 1)))
</pre>



<p>
will run forever.
</p>
<p>
Variable arity functions are available, too:
</p>


<pre class="src src-eulisp">(defun <span style="color: #0000ff; font-weight: bold;">bar</span> (<span style="color: #0000ff; font-weight: bold;">a</span> b . c)
  <span style="color: #0000ff; font-weight: bold;">(list</span> a b c))
</pre>




<p>
can take 2 or more arguments. The first two arguments are bounds to a and b
as usual, the rest are made into a list which is bound to c. Thus <code>(bar 1 2 3 4 5)</code> prints <code>(1 2 (3 4 5))</code>, and <code>(bar 99 100)</code> prints <code>(99 100 ())</code>.
</p>
</div>

</div>

<div id="outline-container-11" class="outline-2">
<h2 id="sec-11"><span class="section-number-2">11</span> Arithmetic </h2>
<div class="outline-text-2" id="text-11">

<p>All the usual stuff here. Functions <a href="EuLisp-0.991/html/eulispcl17.html#dx21-661004"><code>+</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-663002"><code>-</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-665002"><code>*</code></a> and <a href="EuLisp-0.991/html/eulispcl17.html#dx21-667002"><code>/</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-677002"><code>abs</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-527002"><code>sin</code></a>,
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-537002"><code>exp</code></a> and so on. Use <code>(pow a b)</code> to raise <code>a</code> to power <code>b</code>. Additionally,
the basic arithmetic ops have variable arity:
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(+</span>) -&gt; 0
<span style="color: #0000ff; font-weight: bold;">(+</span> 1) -&gt; 1
<span style="color: #0000ff; font-weight: bold;">(+</span> 1 2) -&gt; 3
<span style="color: #0000ff; font-weight: bold;">(+</span> 1 2 3) -&gt; 6
<span style="color: #0000ff; font-weight: bold;">(-</span> 1) -&gt; -1
<span style="color: #0000ff; font-weight: bold;">(*</span> 1 2 3 4) -&gt; 24
</pre>




<p>
and so on.
</p>
</div>

</div>

<div id="outline-container-12" class="outline-2">
<h2 id="sec-12"><span class="section-number-2">12</span> Modules </h2>
<div class="outline-text-2" id="text-12">

<p>Now for something a little different. The basic unit of a program in EuLisp
is the module. Modules provide a way of fixing the global namespace pollution
problem: each module has its very own namespace. A module can import names
from other modules, and can export names too.
</p>
<p>
Here is a simple module:
</p>


<pre class="src src-eulisp">(defmodule <span style="color: #0000ff; font-weight: bold;">one</span>
  (<span style="color: #0000ff; font-weight: bold;">syntax</span> (<span style="color: #0000ff; font-weight: bold;">syntax-0</span>)
   <span style="color: #0000ff; font-weight: bold;">import</span> (<span style="color: #0000ff; font-weight: bold;">level-0</span>))

  (defun <span style="color: #0000ff; font-weight: bold;">foo</span> ...)
  (defun <span style="color: #0000ff; font-weight: bold;">bar</span> ...)
  (deflocal <span style="color: #0000ff;">baz</span> ...)
  ...

  (<span style="color: #0000ff; font-weight: bold;">export</span> foo baz)
)
</pre>



<p>
The module one imports from the system module named <code>level-0</code>. This module
contains all the useful stuff like <a href="EuLisp-0.991/html/eulispcl17.html#dx21-630002"><code>cons</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>, <a href="EuLisp-0.991/html/eulispcl16.html#dx20-229002"><code>defun</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-661004"><code>+</code></a> and so on. In
fact, it's generally a good idea to import the <code>level-0</code> module, otherwise you
can't actually do anything.
</p>
<p>
In module one we define a few name, like <code>foo</code>, <code>bar</code> and <code>baz</code>, and export
<code>foo</code> and <code>baz</code>. Now any module that imports one can access <code>foo</code> and <code>baz</code>,
but bar is completely hidden from everyone.
</p>
<p>
If now, we have
</p>


<pre class="src src-eulisp">(defmodule <span style="color: #0000ff; font-weight: bold;">two</span>
  (<span style="color: #0000ff; font-weight: bold;">syntax</span> (<span style="color: #0000ff; font-weight: bold;">syntax-0</span>)
   <span style="color: #0000ff; font-weight: bold;">import</span> (<span style="color: #0000ff; font-weight: bold;">level-0</span> one))

  ...
)
</pre>



<p>
the module two imports one (and <code>level-0</code>), so two can refer to <code>foo</code> and <code>baz</code>
from one. If two uses a name <code>bar</code>, it is its own <code>bar</code>, and has nothing to
do with the <code>bar</code> in one.
</p>
<ul>
<li id="sec-12.1">Modules in EuLisp <br/>
EuXLisp and Youtoo require each module to be in a file of its own: thus one
should be in a file named one.em (for EuLisp module), and two in <i>two.em</i>.
To enter a module, use



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">!&gt;</span> one)
</pre>



<p>
which will load one if it is not already loaded, and will set the current
module to be one. This is indicated by the prompt
</p>


<pre class="src src-eulisp">user&gt; (<span style="color: #0000ff; font-weight: bold;">!&gt;</span> one)
&lt;reading one.em&gt;
&lt;read one.em&gt;
<span style="color: #0000ff;">&lt;one...done&gt;</span>
#t
one&gt;
</pre>



<p>
Now the read-eval-print loop acts on bindings in the one module. Use <code>(!&gt; user)</code> to switch back to the original module.
</p>
<p>
To re-load a module (after, say, changing the file) use <code>(!&gt;&gt; one)</code>.
</p>
<p>
Modules can rename and filter on <a href="EuLisp-0.991/html/eulispcl10.html#dx12-69001"><code>import</code></a> (not yet on <a href="EuLisp-0.991/html/eulispcl10.html#dx12-68001"><code>export</code></a>). Use
level-0.em for all the basic stuff, e.g.,
</p>


<pre class="src src-eulisp">(defmodule <span style="color: #0000ff; font-weight: bold;">mymod</span>
  (<span style="color: #0000ff; font-weight: bold;">syntax</span> (<span style="color: #0000ff; font-weight: bold;">syntax-0</span>)
   <span style="color: #0000ff; font-weight: bold;">import</span> (<span style="color: #0000ff; font-weight: bold;">level-0</span>))
  ...
  )
</pre>



<p>
If you <a href="EuLisp-0.991/html/eulispcl10.html#dx12-69001"><code>import</code></a> no modules, you get nothing&mdash;not even special forms! See
<i>Modules/rename.em</i>.
</p>
<p>
Look at directory <i>Modules</i> for a few examples (the basic EuLisp functionality
in the modules in <i>EuXLisp/Boot</i> are written the scheme-like syntax of
xscheme).
</p>
</li>
</ul>
</div>

</div>

<div id="outline-container-13" class="outline-2">
<h2 id="sec-13"><span class="section-number-2">13</span> Errors and the Debug Loop </h2>
<div class="outline-text-2" id="text-13">

<p>When you make an error, EuLisp will call an error handler. The full use of
error handlers is too tricky for an introductory set of notes, so we shall
rely on the default (built-in) handler. In EuXLisp an error puts the system
into a simple debugging loop:
</p>


<pre class="src src-eulisp">user&gt; qwerty
<span style="color: #000000;">Continuable</span> error---calling default handler:
<span style="color: #000000;">Condition</span> class is #&lt;class unbound-error&gt;
message: <span style="color: #00ff00;">"variable unbound in module 'user'"</span>
value: qwerty

<span style="color: #000000;">Debug</span> loop. <span style="color: #000000;">Type</span> help: for help
<span style="color: #000000;">Broken</span> at #&lt;Code #1008a768&gt;

<span style="color: #000000;">DEBUG&gt;</span>
</pre>



<p>
There is a lot of information here, and you should look carefully at what
EuXLisp is telling you.
</p>
<p>
In this case, the call of error is an 'unbound-error', i.e., reference to an
undefined variable. The message gives an English description of the error,
while the value fills in some details, so it is the variable named qwerty that
is at fault.
</p>
<p>
Another error:
</p>


<pre class="src src-eulisp">user&gt; <span style="color: #0000ff; font-weight: bold;">(car</span> 5)
<span style="color: #000000;">Continuable</span> error---calling default handler:
<span style="color: #000000;">Condition</span> class is #&lt;class bad-type&gt;
message: <span style="color: #00ff00;">"incorrect type in car"</span>
value: 5
expected-type: #&lt;class cons&gt;

<span style="color: #000000;">Debug</span> loop. <span style="color: #000000;">Type</span> help: for help
<span style="color: #000000;">Broken</span> at #&lt;Code #100820a8&gt;

<span style="color: #000000;">DEBUG&gt;</span>
</pre>



<p>
This is a 'bad-type' error, where the function car was expecting a different
type of argument; it got a 5, where it was expecting something of class cons,
i.e., some sort of list.
</p>
<p>
The prompt becomes <code>DEBUG&gt;</code> to indicate we are in the debug loop. In this
loop things act as normal, except we have some additional functions to play
with. Type help: to get
</p>


<pre class="src src-eulisp"><span style="color: #000000;">Debug</span> loop.
top: return to top level
resume: or (<span style="color: #0000ff; font-weight: bold;">resume:</span> val) resume from <span style="font-weight: bold;">error</span>
bt: backtrace
locals: local variables
cond: current condition
up: or (<span style="color: #0000ff; font-weight: bold;">up:</span> n) up one or n frames
down: or (<span style="color: #0000ff; font-weight: bold;">down:</span> n) down one or n frames
where: current function
</pre>



<p>
The most useful of these is top:, which clears up the error and returns us to
the top-level read-eval-print loop; and bt: which gives us a backtrace, i.e.,
a list of the function calls and their arguments that took us to where we are
now. (Note that, as EuLisp is tail recursive, EuXLisp does not save all the
return addresses of the functions that it travels through, so the backtrace
may omit certain intermediate function calls.)
</p>
<p>
In a debug loop ^D will act as resume:, which is to try to carry on from the
point of error. Debug loops can be nested.
</p>
</div>

</div>

<div id="outline-container-14" class="outline-2">
<h2 id="sec-14"><span class="section-number-2">14</span> Classes and Generic Functions </h2>
<div class="outline-text-2" id="text-14">

<p>EuLisp has a full object system. At Level 0, it is a simple, non-reflective
system, comparable to C++'s class system. Every object in EuLisp has a class,
which is itself a first-class object: this means that classes are supported at
the same level as any other object in the system, and can be created, passed
to functions, returned from functions, and so on. For example, the integer
<code>1</code> has class <a href="EuLisp-0.991/html/eulispcl17.html#dx21-589035"><code>&lt;integer&gt;</code></a> (or rather, has a class with name <code>&lt;integer&gt;</code>).
</p>
<p>
In fact, EuXLisp has (class-of 1) to be <a href="EuLisp-0.991/html/eulispcl17.html#dx21-560035"><code>&lt;fpi&gt;</code></a> (for fixed point integer),
which is a subclass of <a href="EuLisp-0.991/html/eulispcl17.html#dx21-589035"><code>&lt;integer&gt;</code></a>.
</p>
<p>
Classes are fully-fledged objects, so they have a class, too
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(class-of</span> <span style="color: #0000ff;">&lt;integer&gt;</span>) -&gt; #&lt;class class&gt;
</pre>



<p>
the print representation of the class <a href="EuLisp-0.991/html/eulispcl11.html#dx13-76007"><code>&lt;class&gt;</code></a>. Finally, (class-of
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-76007"><code>&lt;class&gt;</code></a>) is <code>&lt;class&gt;</code> itself, or else we would need an infinite tower of
classes.
</p>
<p>
To make an instance of a class, use make
</p>


<pre class="src src-eulisp">(make <span style="color: #0000ff;">&lt;cons&gt;</span> car: 1 cdr: 2) -&gt; (<span style="color: #0000ff; font-weight: bold;">1</span> . 2)
</pre>



<p>
The keywords (symbols whose names end with colons) indicate how to fill in the
various slots of the instance of the class. The keywords can be in any order,
and can be omitted if not necessary: though some classes have slots with
required keywords. This means that instances of such classes must have
certain information passed to make in order to succeed. Some classes are
abstract, and you cannot make instances of them. They are there purely for
other classes to inherit from. The class <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615006"><code>&lt;list&gt;</code></a> is abstract, while its
subclass <a href="EuLisp-0.991/html/eulispcl17.html#dx21-626002"><code>&lt;cons&gt;</code></a> is concrete.
</p>
<p>
It is simple to create new classes by the use of defclass.
</p>


<pre class="src src-eulisp">(defclass <span style="color: #0000ff; font-weight: bold;">&lt;rat&gt;</span> ()
   ((<span style="color: #0000ff; font-weight: bold;">num</span> keyword: num:
         default: 0
         accessor: num)
    (<span style="color: #0000ff; font-weight: bold;">den</span> keyword: den:
         default: 1
         accessor: den))
    predicate: rat?
    constructor: (<span style="color: #0000ff; font-weight: bold;">rat</span> num: den:))
</pre>



<p>
There are many parts to explain.
</p>
<p>
This form defines a new class named <code>&lt;rat&gt;</code>. Classes in EuLisp are
conventionally noted by the use of angle brackets <code>&lt;&gt;</code>, but they are just
normal names. The <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a> next is the list of classes for <code>&lt;rat&gt;</code> to inherit
from. In EuLisp Level 0, there is only single inheritance, so this should be
a list of at most one class. Any empty list indicates some suitable default
super-class.
</p>
<p>
Next is a list of slot descriptions. Each has a slot name first, then a list
of slot options. The slot options are identified by keywords which can come
in any order, and can be omitted it you don't want them.
</p>
<p>
The slot options are:
</p><ul>
<li>
<code>keyword:</code> a keyword to use in a make of the class instance.
</li>
<li>
<code>default:</code> a default value to put in the slot if a value is not passed via
the keyword.
</li>
<li>
<code>accessor:</code> a name that will be bound to functions to read and write the
slot. In the above example, num will name a function to read the num slot
in an instance of <code>&lt;rat&gt;</code>. Similarly, <code>(setter num)</code> will be a function to
write to such a slot. See setters.
</li>
<li>
<code>reader:</code> a name for a slot reader.
</li>
<li>
<code>writer:</code> a name for a slot writer.
</li>
<li>
<code>required?:</code> use <code>required?: t</code> to indicate a required slot. This slot must
have a <code>keyword: keyword</code>!

</li>
</ul>

<p>The <code>accessor:</code>, <code>reader:</code> and <code>writer:</code> options can be repeated as many times
as you wish with different names.
</p>
<p>
Next come the class options. Again, in any order or omitted.
</p>
<ul>
<li>
<code>predicate:</code> a symbol to name a function that will return true on an
instance of the class, and false on all other objects.
</li>
<li>
<code>constructor:</code> a way to name a function to make an instance of the class.
In this case, rat will name a function of two arguments that makes an
instance of <code>&lt;rat&gt;</code>. The first argument will be given to the <code>num:</code>
keyword, the second to the <code>den:</code>. This is equivalent to defining



<pre class="src src-eulisp">(defun <span style="color: #0000ff; font-weight: bold;">rat</span> (<span style="color: #0000ff; font-weight: bold;">n</span> d)
  (make <span style="color: #0000ff;">&lt;rat&gt;</span> num: n den: d))
</pre>



<p>
As usual, you can reorder or leave out bits as you feel.
</p></li>
<li>
<code>abstract?: t</code> to indicate that this class is abstract, and no direct
instances can be made.

</li>
</ul>

<p>The class options <code>predicate:</code> and <code>constructor:</code> can be repeated.
</p>
<p>
To see all the currently defined classes in EuXLisp use <code>(class-hierarchy)</code>.
Other useful functions include class-superclasses, class-subclasses and
class-slots.
</p>
<ul>
<li id="sec-14.1">Generic Functions <br/>
Generic functions are (again) first-class objects in EuLisp, constructed by
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-948002"><code>defgeneric</code></a>. Methods are added to them by defmethod (unlike some other
systems, a generic function must be created by defgeneric before <a href="EuLisp-0.991/html/eulispcl18.html#dx23-957002"><code>defmethod</code></a>
will work.)



<pre class="src src-eulisp">(defgeneric <span style="color: #0000ff; font-weight: bold;">foo</span> (<span style="color: #0000ff; font-weight: bold;">a</span> b))

(defmethod <span style="color: #0000ff; font-weight: bold;">foo</span> ((<span style="color: #0000ff; font-weight: bold;">a</span> <span style="color: #0000ff;">&lt;integer&gt;</span>) (<span style="color: #0000ff; font-weight: bold;">b</span> <span style="color: #0000ff;">&lt;integer&gt;</span>))
  <span style="color: #0000ff; font-weight: bold;">(list</span> 'int 'int))

(defmethod <span style="color: #0000ff; font-weight: bold;">foo</span> ((<span style="color: #0000ff; font-weight: bold;">x</span> <span style="color: #0000ff;">&lt;float&gt;</span>) (<span style="color: #0000ff; font-weight: bold;">y</span> <span style="color: #0000ff;">&lt;float&gt;</span>))
  <span style="color: #0000ff; font-weight: bold;">(list</span> 'float 'float))
</pre>



<p>
This defines a generic of two arguments, and two methods. So
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">foo</span> 4 5) -&gt; (<span style="color: #0000ff; font-weight: bold;">int</span> int)
(<span style="color: #0000ff; font-weight: bold;">foo</span> 1.0 2.0) -&gt; (<span style="color: #0000ff; font-weight: bold;">float</span> float)
(<span style="color: #0000ff; font-weight: bold;">foo</span> 2 2.0) -&gt; <span style="font-weight: bold;">error</span>, <span style="color: #00ff00;">"no applicable methods"</span>
</pre>



<p>
The methods discriminate off all the arguments, working left to right.
Adding another method
</p>


<pre class="src src-eulisp">(defmethod <span style="color: #0000ff; font-weight: bold;">foo</span> ((<span style="color: #0000ff; font-weight: bold;">n</span> <span style="color: #0000ff;">&lt;number&gt;</span>) (<span style="color: #0000ff; font-weight: bold;">m</span> <span style="color: #0000ff;">&lt;number&gt;</span>))
  <span style="color: #0000ff; font-weight: bold;">(list</span> 'num 'num))
</pre>



<p>
we get <code>(foo 2 2.0) -&gt; (num num)</code>. Generally the most specific method for a
given set of arguments is the method that is executed in a generic call.
The next most specific method can be invoked by using <code>(call-next-method)</code>
in the body of the current method.
</p>
</li>
</ul>
</div>

</div>

<div id="outline-container-15" class="outline-2">
<h2 id="sec-15"><span class="section-number-2">15</span> Threads </h2>
<div class="outline-text-2" id="text-15">

<p>EuLisp supports multiple threaded programming by supplying some basic thread
primitives.
</p>
<p>
To make a thread use
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">make-thread</span> fn)
</pre>



<p>
which returns a thread object (another first-class object). The fn is the
function that the thread will start executing when it and when starts running.
</p>
<p>
A thread will not run until it is started
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(thread-start</span> thr arg arg ...)
</pre>



<p>
This function takes a thread thr and starts executing the function <code>fn</code> (from
<code>make-thread</code>) on the arguments <code>arg</code>. That is, it starts executing <code>(fn arg arg ...)</code>.
</p>
<p>
Or it would start executing the thread if there were enough processors to do
so. As is most likely, the thread is simply marked as ready to run whenever
the resource is available. The EuLisp model requires the programmer to write
in such a manner that does not presume any particular number of processors are
available. Even if there is just one processor, the program should be written
to work. To aid this, there is the function
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(thread-reschedule</span>)
</pre>



<p>
which will suspend the current thread, and allow another to run in its place.
If there are enough processors so that all threads are running, then
thread-reschedule could have no effect at all.
</p>
<p>
An single-threaded implementation such as EuXLisp requires a sprinkling of
thread-reschedules for a parallel program to work.
</p>
<p>
Threads are often used for their effect, but they can also return a value.
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(thread-value</span> thr)
</pre>



<p>
will suspend the calling thread (and allow another to run in its place) until
the thread thr returns a value (and returns what the thr returned). A thread
can return a value simply by returning from its initial function (<code>fn</code>,
above).
</p>
<ul>
<li id="sec-15.1">Semaphores <br/>
EuLisp provides simple binary semaphores, named locks, with functions
<code>make-lock</code> to make one, lock to gain a semaphore, and unlock to release.

<p>
Locking a locked lock will suspend the calling thread (and allow another to
run) until some other thread releases the lock.
</p>
</li>
</ul>
</div>

</div>

<div id="outline-container-16" class="outline-2">
<h2 id="sec-16"><span class="section-number-2">16</span> Input and Output </h2>
<div class="outline-text-2" id="text-16">

<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-780002"><code>read</code></a> to read a Lisp expression.
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-807002"><code>write</code></a> write to standard output in a way that can be re-read if possible.
Thus, for example, strings are quoted.
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-823002"><code>prin</code></a> print to standard output in a human-friendly manner. Strings and
such are not quoted. Compare



<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(prin</span> <span style="color: #00ff00;">"asd"</span>) prints: asd
<span style="color: #0000ff; font-weight: bold;">(write</span> <span style="color: #00ff00;">"asd"</span>) prints: <span style="color: #00ff00;">"asd"</span>
</pre>



</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-831002"><code>print</code></a> as <a href="EuLisp-0.991/html/eulispcl17.html#dx21-823002"><code>prin</code></a>, with a newline.
</li>
<li>
Print and write functions are n-ary:



<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(prin</span> <span style="color: #00ff00;">"one = "</span> 1 <span style="color: #00ff00;">", two = "</span> 2) prints: one = 1, two = 2
<span style="color: #0000ff; font-weight: bold;">(write</span> <span style="color: #00ff00;">"one = "</span> 1 <span style="color: #00ff00;">", two = "</span> 2) prints: <span style="color: #00ff00;">"one = "</span>1<span style="color: #00ff00;">", two = "</span>2
</pre>



</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-838002"><code>newline</code></a> output a newline.

</li>
</ul>

<p>All of the above have variants beginning with an 's' which take a stream to
print on as the first argument.
</p>
<p>
For stream manipulation:
</p><ul>
<li>
open-input-file takes a string, and opens and returns a corresponding
stream for input. Returns <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a> if not such file exists.
</li>
<li>
open-output-file creates a file if it didn't already exist.
</li>
<li>
open-update-file opens for append.
</li>
<li>
get-file-position and <code>(setter get-file-position)</code> move the file pointer in
a file opened for update.
</li>
<li>
close-stream closes an open stream.

</li>
<li id="sec-16.1">Format <br/>
A more complicated printing function is <a href="EuLisp-0.991/html/eulispcl17.html#dx21-581002"><code>sformat</code></a>, which is somewhat akin to
C's <code>printf</code>.



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">sformat</span> stream format-string arg arg ...)
</pre>



<p>
The variants <a href="EuLisp-0.991/html/eulispcl17.html#dx21-583002"><code>format</code></a> and <a href="EuLisp-0.991/html/eulispcl17.html#dx21-585002"><code>fmt</code></a> do not take a stream argument and the former
prints to standard output and the latter returns the formatted output as a
string.
</p>
<p>
The format string is copied to the output, except that <code>~</code> marks an escape
(like C's <code>%</code>):
</p><ul>
<li>
<code>~a</code> output the next arg using <a href="EuLisp-0.991/html/eulispcl17.html#dx21-823002"><code>prin</code></a>
</li>
<li>
<code>~s</code> output the next arg using <a href="EuLisp-0.991/html/eulispcl17.html#dx21-807002"><code>write</code></a>
</li>
<li>
<code>~%</code> output a newline
</li>
<li>
<code>~~</code> output a <code>~</code>
</li>
<li>
<code>~c</code> output a character
</li>
<li>
<code>~d</code> output an integer
</li>
<li>
<code>~e</code> <code>~f</code>, <code>~g</code> floating point formats
</li>
<li>
<code>~t</code> output a tab

</li>
</ul>

<p>There are other escapes to write integers in other bases, output new pages,
and so on.
</p>
<p>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-585002"><code>fmt</code></a> can be used with the n-ary print and write functions to write complex
formatted output statements in a more readable form that using <a href="EuLisp-0.991/html/eulispcl17.html#dx21-583002"><code>format</code></a>
\e.g.\
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(print</span> <span style="color: #00ff00;">"one = "</span> 1 <span style="color: #00ff00;">", x = "</span> (<span style="color: #0000ff; font-weight: bold;">fmt</span> <span style="color: #00ff00;">"~e"</span> 0.000002)) prints: one = 1, x = 2.000000e-06
</pre>




</li>
</ul>
</div>

</div>

<div id="outline-container-17" class="outline-2">
<h2 id="sec-17"><span class="section-number-2">17</span> Defining Syntax </h2>
<div class="outline-text-2" id="text-17">

<p>EuLisp employs the usual backquoted template style for defining new syntax
(macros).
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">defsyntax</span> first (<span style="color: #0000ff; font-weight: bold;">x</span>)
  `<span style="color: #0000ff; font-weight: bold;">(car</span> ,x))
</pre>



<p>
Note that a new syntax operator cannot be used in the module where it is
defined: a module must be fully syntax-expanded before it can be compiled. If
you don't know what is and what isn't a syntax operator beforehand, it is very
difficult to do this. Thus a module containing
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">defsyntax</span> second (<span style="color: #0000ff; font-weight: bold;">x</span>)
   `<span style="color: #0000ff; font-weight: bold;">(cadr</span> ,x))

(defun <span style="color: #0000ff; font-weight: bold;">foo</span> (<span style="color: #0000ff; font-weight: bold;">x</span>) <span style="color: #0000ff; font-weight: bold;">(+</span> 1 (<span style="color: #0000ff; font-weight: bold;">second</span> x)))
</pre>



<p>
is doomed to failure by this restriction.
</p>
<p>
There is a wrinkle in the way that syntax operators interact with modules:
suppose a syntax form expands into something that refers to bindings that are
not imported into the current module?
</p>


<pre class="src src-eulisp">(defmodule <span style="color: #0000ff; font-weight: bold;">one</span>
  (<span style="color: #0000ff; font-weight: bold;">syntax</span> (<span style="color: #0000ff; font-weight: bold;">syntax-0</span>)
   <span style="color: #0000ff; font-weight: bold;">import</span> (<span style="color: #0000ff; font-weight: bold;">level-0</span>))

  (<span style="color: #0000ff; font-weight: bold;">defsyntax</span> foo (<span style="color: #0000ff; font-weight: bold;">x</span>)
     `<span style="color: #0000ff; font-weight: bold;">(car</span> (<span style="color: #0000ff; font-weight: bold;">bar</span> ,x)))

  (defun <span style="color: #0000ff; font-weight: bold;">bar</span> (<span style="color: #0000ff; font-weight: bold;">a</span>) ...)

  (<span style="color: #0000ff; font-weight: bold;">export</span> foo)
)
</pre>



<p>
Here the module <code>one</code> exports foo only, but <code>foo</code> expands into a reference to
<code>bar</code>.
</p>


<pre class="src src-eulisp">(defmodule <span style="color: #0000ff; font-weight: bold;">two</span>
  (<span style="color: #0000ff; font-weight: bold;">syntax</span> (<span style="color: #0000ff; font-weight: bold;">syntax-0</span>)
   <span style="color: #0000ff; font-weight: bold;">import</span> (<span style="color: #0000ff; font-weight: bold;">level-0</span>))

  ...
  (<span style="color: #0000ff; font-weight: bold;">foo</span> 4)
  ...
)
</pre>



<p>
In the syntax expansion of module <code>two</code>, a reference to bar would appear, but
bar is not defined in <code>two</code>. Worse, maybe <code>bar</code> was defined in <code>two</code>: which
<code>bar</code> does the syntax expanded form refer to? The <code>bar</code> from <code>one</code> or the
<code>bar</code> from <code>two</code>?
</p>
<p>
The answer is "the right <code>bar</code>", that is that <code>bar</code> in the module of syntax
definition, not the <code>bar</code> in the module of syntax use. EuLisp takes care of
all of this transparently for you: essentially every symbol remembers which
module it was defined in, and always refers back to that module for its value.
</p>
<p>
This provides a simple solution to the "macro hygene" problem that has always
plagued Lisp macros.
</p>
<p>
Sometimes you do want a symbol to be captured in the module of use: EuXLisp
provides a facility to allow you to do this.
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">defsyntax</span> while (<span style="color: #0000ff; font-weight: bold;">test</span> . body)
  `(let/cc {break}
     (letfuns
       ((<span style="color: #0000ff; font-weight: bold;">loop</span> ()
          <span style="color: #0000ff; font-weight: bold;">(when</span> ,test
                ,@body
                (<span style="color: #0000ff; font-weight: bold;">loop</span>))))
       (<span style="color: #0000ff; font-weight: bold;">loop</span>))))
</pre>



<p>
The symbol loop cannot be captured by the code in body, while the symbol break
is intended to be captured. The curly braces about the symbol indicates that
it is to be interpreted as coming from the module of use, not the module of
definition. Thus, a reference to break in the body will refer to the binding
in the <a href="EuLisp-0.991/html/eulispcl16.html#dx20-272002"><code>let/cc</code></a>.
</p>
<p>
Notice that <code>(eq 'break '{break}) -&gt; t</code>. As symbols they are <a href="EuLisp-0.991/html/eulispcl17.html#dx21-437004"><code>eq</code></a>, but as
identifiers they are quite different.
</p></div>

</div>

<div id="outline-container-18" class="outline-2">
<h2 id="sec-18"><span class="section-number-2">18</span> Miscellany </h2>
<div class="outline-text-2" id="text-18">

<ul>
<li id="sec-18.1">Keywords <br/>
There are keywords (unbindable, unassignable, self-evaluating symbols),
<i>e.g.</i>,



<pre class="src src-eulisp">(defclass <span style="color: #0000ff; font-weight: bold;">foo</span> ()
  ((<span style="color: #0000ff; font-weight: bold;">a</span> default: 99
      keyword: a:
      accessor: foo-a))
  constructor: (<span style="color: #0000ff; font-weight: bold;">make-foo</span> a:))
</pre>




</li>
<li id="sec-18.2">Comparisons <br/>
EuLisp has the usual tests for equality:
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-437004"><code>eq</code></a> for identity
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-441002"><code>eql</code></a> for identity integers and characters
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-444002"><code>binary=</code></a> generic function with methods for most types
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-452002">===</a> n-ary equality which calls <a href="EuLisp-0.991/html/eulispcl17.html#dx21-444002"><code>binary=</code></a> for each pair

</li>
</ul>

<p>Note that
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(eql</span> 1 1.0) -&gt; ()
<span style="color: #0000ff; font-weight: bold;">(=</span> 1 1.0) -&gt; <span style="font-weight: bold; text-decoration: underline;">t</span>
</pre>



<p>
There is also the usual <a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-460002"><code>&lt;=</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-458002"><code>&gt;</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-462002"><code>&gt;=</code></a>, which are n-ary:
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(&lt;</span> a b c ...)
</pre>



<p>
returns <a href="EuLisp-0.991/html/eulispcl16.html#dx20-210002"><code>t</code></a> when <code>a</code>, <code>b</code>, <code>c</code>, etc., form a strictly increasing sequence.
Similarly <a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>= for a non-decreasing sequence, and so on.
</p>
</li>
<li id="sec-18.3">Generic Arithmetic <br/>
The arithmetic operators <a href="EuLisp-0.991/html/eulispcl17.html#dx21-661004"><code>+</code></a> and so on are all n-ary, i.e., take a variable
number of arguments. Each operator is defined in terms of a binary generic
function: <a href="EuLisp-0.991/html/eulispcl17.html#dx21-691002"><code>binary+</code></a> for <a href="EuLisp-0.991/html/eulispcl17.html#dx21-661004"><code>+</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-695002"><code>binary*</code></a> for <a href="EuLisp-0.991/html/eulispcl17.html#dx21-665002"><code>*</code></a>, etc. The n-ary form is just
a repeated application of the binary form



<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(+</span> a b c ...) = ((<span style="color: #0000ff; font-weight: bold;">..</span><span style="color: #0000ff; font-weight: bold;">(binary+</span> <span style="color: #0000ff; font-weight: bold;">(binary+</span> a b) c) ...))
</pre>



<p>
Methods can be added to the binary operators
</p>


<pre class="src src-eulisp">(defmethod <span style="color: #0000ff; font-weight: bold;">binary+</span> ((<span style="color: #0000ff; font-weight: bold;">a</span> <span style="color: #0000ff;">&lt;symbol&gt;</span>) (<span style="color: #0000ff; font-weight: bold;">b</span> <span style="color: #0000ff;">&lt;symbol&gt;</span>))
  ...)
</pre>



<p>
and then you can use <a href="EuLisp-0.991/html/eulispcl17.html#dx21-661004"><code>+</code></a> to add symbols: <code>(+ 'a 'b 'c)</code>.
</p>
<p>
There are also generic functions <code>unary-</code> and <code>unary/</code> for the unary <code>(- x)</code>
and <code>(/ x)</code> (reciprocal).
</p>
<p>
Similarly, the comparators <a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-458002"><code>&gt;</code></a>, <a href="EuLisp-0.991/html/eulispcl17.html#dx21-460002"><code>&lt;=</code></a> etc., are all defined in terms of
the two generic functions <a href="EuLisp-0.991/html/eulispcl17.html#dx21-449002"><code>binary&lt;</code></a> and <a href="EuLisp-0.991/html/eulispcl17.html#dx21-444002"><code>binary=</code></a>.
</p>
</li>
<li id="sec-18.4">Local Functions <br/>
Just like <a href="EuLisp-0.991/html/eulispcl16.html#dx20-289003"><code>let</code></a> introduces local variables, the <code>letfuns</code> form can introduce
local functions.



<pre class="src src-eulisp">(letfuns
  ((<span style="color: #0000ff; font-weight: bold;">foo</span> (<span style="color: #0000ff; font-weight: bold;">a</span> b)
     ... (<span style="color: #0000ff; font-weight: bold;">bar</span> a) ... )
   (<span style="color: #0000ff; font-weight: bold;">bar</span> (<span style="color: #0000ff; font-weight: bold;">x</span>)
     ... (<span style="color: #0000ff; font-weight: bold;">foo</span> x (<span style="color: #0000ff; font-weight: bold;">bar</span> x)) ... ))
  ...
  (<span style="color: #0000ff; font-weight: bold;">foo</span> 3 4)
  ...
)
</pre>



<p>
The <code>letfuns</code> takes a list of function definitions. They may be self and
mutually recursive. These functions may be used within the body of the
<code>letfuns</code> just like global functions. Iterating functions are often most
conveniently written in terms of <code>letfuns</code> as the bodies of the function
definitions can refer to local variables:
</p>


<pre class="src src-eulisp">(let ((<span style="color: #0000ff; font-weight: bold;">a</span> 1))
  (letfuns
    ((<span style="color: #0000ff; font-weight: bold;">addit</span> (<span style="color: #0000ff; font-weight: bold;">x</span>)
       (if (<span style="color: #0000ff; font-weight: bold;">null</span> x)
           ()
           <span style="color: #0000ff; font-weight: bold;">(cons</span> <span style="color: #0000ff; font-weight: bold;">(+</span> a <span style="color: #0000ff; font-weight: bold;">(car</span> x)) (<span style="color: #0000ff; font-weight: bold;">addit</span> <span style="color: #0000ff; font-weight: bold;">(cdr</span> x))))))
    (<span style="color: #0000ff; font-weight: bold;">addit</span> '(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3))))
-&gt;
(<span style="color: #0000ff; font-weight: bold;">2</span> 3 4)
</pre>




</li>
<li id="sec-18.5">Mapping and Collections <br/>
There are several functions supplied to iterate along collections.
Collections include <code>lists</code>, <code>vectors</code>, <code>strings</code>, and <code>tables</code>.

<p>
The generic function <a href="EuLisp-0.991/html/eulispcl17.html#dx21-395002"><code>map</code></a> takes a function and a collection
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(map</span> list '(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3)) -&gt; ((<span style="color: #0000ff; font-weight: bold;">1</span>) (<span style="color: #0000ff; font-weight: bold;">2</span>) (<span style="color: #0000ff; font-weight: bold;">3</span>))
<span style="color: #0000ff; font-weight: bold;">(map</span> - #(<span style="color: #0000ff; font-weight: bold;">4</span> 5 6)) -&gt; #(<span style="color: #0000ff; font-weight: bold;">-4</span> -5 -6)
</pre>



<p>
or more than one collection
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(map</span> cons '(<span style="color: #0000ff; font-weight: bold;">a</span> b c) '(<span style="color: #000000;">A</span> <span style="color: #000000;">B</span> <span style="color: #000000;">C</span>)) -&gt; ((<span style="color: #0000ff; font-weight: bold;">a</span> . <span style="color: #000000;">A</span>) (<span style="color: #0000ff; font-weight: bold;">b</span> . <span style="color: #000000;">B</span>) (<span style="color: #0000ff; font-weight: bold;">c</span> . <span style="color: #000000;">C</span>))
<span style="color: #0000ff; font-weight: bold;">(map</span> + #(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3) #(<span style="color: #0000ff; font-weight: bold;">10</span> 10 10 10)) -&gt; #(<span style="color: #0000ff; font-weight: bold;">11</span> 12 13)
</pre>



<p>
The mapping stops when any collection runs out. Even a mixture will work
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(map</span> * '(<span style="color: #0000ff; font-weight: bold;">2</span> 4 6) #(<span style="color: #0000ff; font-weight: bold;">1</span> -1 1)) -&gt; (<span style="color: #0000ff; font-weight: bold;">2</span> -4 6)
<span style="color: #0000ff; font-weight: bold;">(map</span> * #(<span style="color: #0000ff; font-weight: bold;">2</span> 4 6) '(<span style="color: #0000ff; font-weight: bold;">1</span> -1 1)) -&gt; #(<span style="color: #0000ff; font-weight: bold;">2</span> -4 6)
</pre>



<p>
The type of collection returned is the same as the first collection
argument.
</p>
<p>
If you don't need a return value, but are iterating purely for effect, use
do
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(do</span> print '(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3))
</pre>



<p>
Other iterators include <a href="EuLisp-0.991/html/eulispcl17.html#dx21-348020"><code>accumulate</code></a>
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(accumulate</span> list () #(<span style="color: #0000ff; font-weight: bold;">a</span> b c)) -&gt; (((() a) b) c)
<span style="color: #0000ff; font-weight: bold;">(accumulate</span> * 1 '(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3 4 5 6 7)) -&gt; 5040
</pre>




<p>
which takes a function, an initial value, an a collection to iterate over.
</p>
<p>
You can find the size of any collection using the function size. This
returns the length of a list of string, number of elements of a vector, and
so on. It can be reversed by reverse; an element removed by remove
(non-destructive) or by delete (destructive); find an element by (member elt
collection). The last three (remove, delete and member) take an optional
last argument that is a test for equality: it is this test that is used when
looking for an element in the collection. It defaults to eql.
</p>
<p>
The function concatenate can be used to join collections:
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(concatenate</span> '(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3) '(<span style="color: #0000ff; font-weight: bold;">4</span> 5 6)) -&gt; (<span style="color: #0000ff; font-weight: bold;">1</span> 2 3 4 5 6)
<span style="color: #0000ff; font-weight: bold;">(concatenate</span> <span style="color: #00ff00;">"abc"</span> <span style="color: #00ff00;">"def"</span>) -&gt; <span style="color: #00ff00;">"abcdef"</span>
<span style="color: #0000ff; font-weight: bold;">(concatenate</span> '(<span style="color: #0000ff; font-weight: bold;">1</span> 2 3) #(<span style="color: #0000ff; font-weight: bold;">4</span> 5 6)) -&gt; (<span style="color: #0000ff; font-weight: bold;">1</span> 2 3 4 5 6)
</pre>




</li>
<li id="sec-18.6">Loops <br/>
EuLisp doesn't really need loops, as everything can be written in terms of
tail recursive functions. However sometimes a simple loop form is more
convenient and readable and for this a <code>while</code> loop is provided:



<pre class="src src-eulisp">(while bool
   expr
   expr
   ...
)
</pre>



<p>
which loops while the bool returns <code>true</code>.
</p>
</li>
<li id="sec-18.7">Tables <br/>
EuLisp uses tables for a general association mechanism. EuXLisp and Youtoo
implement tables as hash tables, but in general they could be implemented
differently.
<ul>
<li>
<code>make-table</code> returns a table.
</li>
<li>
<code>(table-ref table key)</code> to retrieve a value, <code>((setter table-ref) table key value)</code> to update.
</li>
<li>
<code>(table-delete key)</code> to remove a value.
</li>
<li>
<code>table-keys</code> to get a list of current keys.
</li>
<li>
<code>table-values</code> to get a list of current values.
</li>
<li>
<code>table-clear</code> to completely empty a table.

</li>
</ul>

<p>When looking for a match to a key in a table, the system defaults to <a href="EuLisp-0.991/html/eulispcl17.html#dx21-441002"><code>eql</code></a>.
You can change this by using <code>(make-table comparator)</code>, where <code>comparator</code>
is <a href="EuLisp-0.991/html/eulispcl17.html#dx21-437004"><code>eq</code></a> or <a href="EuLisp-0.991/html/eulispcl17.html#dx21-441002"><code>eql</code></a> or <a href="EuLisp-0.991/html/eulispcl17.html#dx21-444002"><code>binary=</code></a> or <a href="EuLisp-0.991/html/eulispcl17.html#dx21-452002">===</a>.
</p>
<p>
If a value is not found for a particular key in the table <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a> is returned.
This can be changed by <code>(make-table comparator fill-value)</code>. Now
<code>fill-value</code> will be returned on failure.
</p>
<p>
The mapping functions above work on tables, too.
</p>
</li>
<li id="sec-18.8">Non-local exits <br/>
EuLisp supports a limited form of continuation capture via <a href="EuLisp-0.991/html/eulispcl16.html#dx20-272002"><code>let/cc</code></a>. This
form captures its continuation, and allows its use as a non-local exit.



<pre class="src src-eulisp">(let/cc out
   ...
   (<span style="color: #0000ff; font-weight: bold;">out</span>)
   ...
)
<span style="color: #ff00ff; font-weight: bold;">;; </span><span style="color: #ff00ff;">after
</span></pre>



<p>
This stores the continuation (i.e., from 'after') in the variable <code>out</code>.
This can be called as a function, whereupon control passes immediately to
that continuation. The value of out can only be used in this way in the
dynamic scope of the <a href="EuLisp-0.991/html/eulispcl16.html#dx20-272002"><code>let/cc</code></a> form: outside the value is 'dead' and no
longer usable.
</p>
<p>
The continuation function can take a single optional argument which is a
value to pass to the continuation: the default is <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a>.
</p>
<p>
The forms <a href="EuLisp-0.991/html/eulispcl16.html#dx20-278002"><code>block</code></a> and <a href="EuLisp-0.991/html/eulispcl16.html#dx20-282002"><code>return-from</code></a> are simply =let/c=c and a call to a
continuation:
</p>


<pre class="src src-eulisp">(block foo
  ...
  (return-from foo)
  ...
)
</pre>



<p>
The unwind-protect form ensures things are executed even if there is a
non-local exit
</p>


<pre class="src src-eulisp">(unwind-protect
  protected-form
  after-form
  after-form
  ...)
</pre>




<p>
This starts by executing the <code>protected-form</code>. If there is no unusual exit
from the <code>protected-form</code>, this will then execute the <code>after-forms</code> and will
return whatever value the <code>protected-form</code> returned. If there is a
non-local exit from the <code>protected-form</code> to a continuation outside the
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-299002"><code>unwind-protect</code></a>, the <code>after-forms</code> will still be executed before the
control passes to the continuation.
</p>
</li>
<li id="sec-18.9">Setters <br/>
Structures, like <code>lists</code>, <code>vectors</code> and <a href="EuLisp-0.991/html/eulispcl18.html#dx23-941001"><code>class</code></a> instances have elements that
can be accessed. The elements of a <a href="EuLisp-0.991/html/eulispcl17.html#dx21-917005"><code>vector</code></a> can be read by <code>vector-ref</code>.
To write to an element use the function <code>(setter vector-ref)</code>,



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">(setter</span> vector-ref) vec index val)
</pre>



<p>
Similarly, the accessor <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a> has an updater <code>(setter car)</code> (often called
<code>rplaca</code> in other Lisps), and so on. In general a reader function <code>r</code> will
have an associated updater <code>(setter r)</code>.
</p>
<p>
The function <a href="EuLisp-0.991/html/eulispcl16.html#dx20-249002"><code>setter</code></a> is a simple association mechanism: <code>setter</code> is a
function that takes a reader and returns the associated writer. To make
such an association between functions <code>r</code> and <code>w</code> just use <a href="EuLisp-0.991/html/eulispcl16.html#dx20-249002"><code>setter</code></a> again
</p>


<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">(setter</span> setter) r w)
</pre>



<p>
In fact, no particular properties of <code>r</code> and <code>w</code>, are used, so this can be
used as a general facility. Further, setter functions, generic functions
and methods can be defined directly:
</p>


<pre class="src src-eulisp">(defun <span style="color: #0000ff; font-weight: bold;">(setter</span> foo) (<span style="color: #0000ff; font-weight: bold;">a</span> b)
  ...)
</pre>




</li>
<li id="sec-18.10">Convert <br/>
The function <a href="EuLisp-0.991/html/eulispcl17.html#dx21-469004"><code>convert</code></a> is used to change an object of one type into an
object of another type. Thus to convert an <a href="EuLisp-0.991/html/eulispcl17.html#dx21-588005"><code>integer</code></a> to a <a href="EuLisp-0.991/html/eulispcl17.html#dx21-548005"><code>float</code></a>



<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(convert</span> 1 <span style="color: #0000ff;">&lt;float&gt;</span>) -&gt; 1.0
</pre>



<p>
or the other way
</p>


<pre class="src src-eulisp"><span style="color: #0000ff; font-weight: bold;">(convert</span> 2.6 <span style="color: #0000ff;">&lt;integer&gt;</span>) -&gt; 2
</pre>




<p>
Many other conversions are available: <a href="EuLisp-0.991/html/eulispcl17.html#dx21-588005"><code>integer</code></a> to <a href="EuLisp-0.991/html/eulispcl17.html#dx21-863005"><code>string</code></a>; <a href="EuLisp-0.991/html/eulispcl17.html#dx21-322005"><code>character</code></a> to
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-863005"><code>string</code></a>; <code>string</code> to <code>number</code>; <a href="EuLisp-0.991/html/eulispcl17.html#dx21-889005"><code>symbol</code></a> to <code>string</code>; <a href="EuLisp-0.991/html/eulispcl17.html#dx21-647002"><code>list</code></a> to <a href="EuLisp-0.991/html/eulispcl17.html#dx21-917005"><code>vector</code></a>;
and so on.
</p>
</li>
<li id="sec-18.11">Copying <br/>
There are two functions that copy structures: <a href="EuLisp-0.991/html/eulispcl17.html#dx21-482004"><code>deep-copy</code></a> and
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-489002"><code>shallow-copy</code></a>. The second recursively descends a structure making copies
of all the elements in the structure; the first makes a single copy of the
top-level structure, and fills its slots will the existing elements:



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">setq</span> a '((<span style="color: #0000ff; font-weight: bold;">1</span> 2) (<span style="color: #0000ff; font-weight: bold;">3</span> 4)))
(<span style="color: #0000ff; font-weight: bold;">setq</span> d <span style="color: #0000ff; font-weight: bold;">(deep-copy</span> a))
<span style="color: #0000ff; font-weight: bold;">(eq</span> a d) -&gt; ()
<span style="color: #0000ff; font-weight: bold;">(binary=</span> a d) -&gt; <span style="font-weight: bold; text-decoration: underline;">t</span>
<span style="color: #0000ff; font-weight: bold;">(eq</span> <span style="color: #0000ff; font-weight: bold;">(car</span> a) <span style="color: #0000ff; font-weight: bold;">(car</span> d)) -&gt; ()

(<span style="color: #0000ff; font-weight: bold;">setq</span> s <span style="color: #0000ff; font-weight: bold;">(shallow-copy</span> a))
<span style="color: #0000ff; font-weight: bold;">(eq</span> a s) -&gt; ()
<span style="color: #0000ff; font-weight: bold;">(binary=</span> a s) -&gt; <span style="font-weight: bold; text-decoration: underline;">t</span>
<span style="color: #0000ff; font-weight: bold;">(eq</span> <span style="color: #0000ff; font-weight: bold;">(car</span> a) <span style="color: #0000ff; font-weight: bold;">(car</span> s)) -&gt; <span style="font-weight: bold; text-decoration: underline;">t</span>
</pre>




</li>
<li id="sec-18.12">Other EuXLisp Tools <br/>
<ul>
<li>
<code>describe</code> gives a little information about an object, e.g., <code>(describe &lt;integer&gt;)</code> or <code>(describe 4)</code>
</li>
<li>
<code>trace</code> can be used to print a message every time a function is entered or
exited. Thus



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">trace</span> foo)
</pre>



<p>
will describe the ins and outs of the function <code>foo</code>. To untrace, use
<code>(untrace foo)</code>. Use <code>(import "trace")</code> to load trace.
</p>
</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-19" class="outline-2">
<h2 id="sec-19"><span class="section-number-2">19</span> Example Modules </h2>
<div class="outline-text-2" id="text-19">

<p>EuXLisp provides a few sample modules.
</p><ul>
<li id="sec-19.1">Trace <br/>
The trace module has been mentioned above.

</li>
<li id="sec-19.2">Linda <br/>
The eulinda module implements the Linda pool mechanism.
<ul>
<li>
<code>make-linda-pool</code> returns a new pool
</li>
<li>
<code>(linda-out pool tag val val ...)</code> writes the tuple <code>(val val ...)</code> under
the tag to the pool
</li>
<li>
<code>(linda-in pool tag pat pat ...)</code> attempts to read a tuple matching the
pattern <code>(pat pat ...)</code> from the pool. If no matching tuple exists in the
pool, the call will block until such a tuple appears. When found, the
tuple is removed from the pool. A pattern is a literal value, to be
matched exactly <code>(? var)</code> to match any value, and assign the matched value
to the variable <code>?</code> to match any value, and to discard the result.
</li>
<li>
<code>linda-read</code> as <code>linda-in</code> but does not remove the tuple from the pool
</li>
<li>
<code>(linda-eval fun arg arg ...)</code> starts a new thread, running the function
with the arguments.

</li>
</ul>

<p>Debugging tools are <code>print-linda-pool</code> to print the curent values in a pool,
and <code>(tril t)</code> to print some trace information as the system is running.
</p>
<p>
The <code>tag</code> must be a <a href="EuLisp-0.991/html/eulispcl17.html#dx21-889005"><code>symbol</code></a> or <code>number</code>.
</p>
</li>
<li id="sec-19.3">Modular Numbers <br/>
The module <code>modular</code> is a simple implementation of modular integers. The
function mod constructs a modular number



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">setq</span> a <span style="color: #0000ff; font-weight: bold;">(mod</span> 3 5)) -&gt; #&lt;3 mod 5&gt;
(<span style="color: #0000ff; font-weight: bold;">setq</span> b <span style="color: #0000ff; font-weight: bold;">(+</span> a a)) -&gt; #&lt;1 mod 5&gt;
<span style="color: #0000ff; font-weight: bold;">(/</span> a) -&gt; #&lt;2 mod 5&gt;
</pre>




</li>
<li id="sec-19.4">Scheme <br/>
This module provides a mostly-conformant Scheme environment. It is probably
not wise to mix Scheme constructs, such as call/cc, with EuLisp constructs,
such as threads.

</li>
<li id="sec-19.5">Paralation Lisp <br/>
This emulates a paralation system. The module <code>tpl</code> (for tiny paralation
lisp) exports
<ul>
<li>
<code>(make-paralation n)</code> to make a new paralation of size <code>n</code>. This returns
a index field of the new paralation.
</li>
<li>
elwise is the element-wise operator:



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">elwise</span> (<span style="color: #0000ff; font-weight: bold;">a</span> b) <span style="color: #0000ff; font-weight: bold;">(+</span> a b))
</pre>



<p>
where <code>a</code> and <code>b</code> are fields on the same paralation.
</p></li>
<li>
<code>(match field field)</code> to create a map between fields, and
</li>
<li>
<code>(move field map combine default)</code> to move a field down a map, using
combine, (a function taking an appropriate number of arguments) to combine
elements that end up at the same element of the target field, and default
as the default value for a field element that is not in the image of the
map.

</li>
</ul>
</li>
<li id="sec-19.6">Values <br/>
This is an emulation of Scheme and Common Lisp's multiple values. The
module values exports
<ul>
<li>
<code>(values val val ...)</code> as the basic multiple value return
</li>
<li>
<code>call-with-values</code> for the Scheme-like values:



<pre class="src src-eulisp">(<span style="color: #0000ff; font-weight: bold;">call-with-values</span>
  (<span style="color: #0000ff; font-weight: bold;">lambda</span> () ...) <span style="color: #ff00ff; font-weight: bold;">; </span><span style="color: #ff00ff;">a thunk returning values
</span> (<span style="color: #0000ff; font-weight: bold;">lambda</span> (<span style="color: #0000ff; font-weight: bold;">a</span> b c ...) ...)) <span style="color: #ff00ff; font-weight: bold;">; </span><span style="color: #ff00ff;">that are passed here, bound
</span> <span style="color: #ff00ff; font-weight: bold;">; </span><span style="color: #ff00ff;">to a, b, etc.
</span></pre>



</li>
<li>
<code>multiple-value-setq</code>; <code>multiple-value-list</code>; <code>multiple-value-call</code>;
<code>values-list</code>; <code>multiple-value-bind</code> are all as in Common Lisp.

</li>
</ul>

<p>If you pass multiple values to a continuation that only expects a single
value you will probably get strange results.
</p>
</li>
<li id="sec-19.7">Sort <br/>
A fast stable merge sort. The module sort exports <a href="EuLisp-0.991/html/eulispcl17.html#dx21-418002"><code>sort</code></a> (non-destructive)
and <code>sort!</code> (destructive). They are called as <code>(sort l)</code>, where <code>l</code> is a
list of values to be sorted. The comparison operator used is <a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>.
Alternatively, you can use <code>(sort l comp)</code>, where comp is a comparator
function.

</li>
</ul>
</div>

</div>

<div id="outline-container-20" class="outline-2">
<h2 id="sec-20"><span class="section-number-2">20</span> EuLisp functions </h2>
<div class="outline-text-2" id="text-20">

<p>Here is a summary of the functions available in EuLisp.
</p><ul>
<li id="sec-20.1">Special operators <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-211007"><code>deflocal</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-207002"><code>defconstant</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-938002"><code>defclass</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl14.html#dx18-162002"><code>defcondition</code></a>
</li>
<li>
<code>defsyntax</code>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-948002"><code>defgeneric</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-957002"><code>defmethod</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-215002"><code>quote</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-221002"><code>lambda</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-289003"><code>let</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-292004"><code>let*</code></a>
</li>
<li>
<code>letfuns</code>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-245003"><code>setq</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-259002"><code>if</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-262002"><code>cond</code></a>
</li>
<li>
<code>when</code>
</li>
<li>
<code>unless</code>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-295004"><code>progn</code></a>
</li>
<li>
<code>while</code>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-265004"><code>and</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-268004"><code>or</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-97003"><code>call-next-method</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-100003"><code>next-method?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-240002"><code>apply</code></a>
</li>
</ul>
</li>
<li id="sec-20.2">Module directives <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl10.html#dx12-68001"><code>export</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl10.html#dx12-70001"><code>expose</code></a>
</li>
</ul>
</li>
<li id="sec-20.3">List functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-630002"><code>cons</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-647002"><code>list</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-634002"><code>cdr</code></a>
</li>
<li>
<code>caar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caaar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cadar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdaar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cddar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caaaar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caaadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caadar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caaddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cadaar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cadadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>caddar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cadddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdaaar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdaadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdadar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdaddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cddaar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cddadr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cdddar</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
<li>
<code>cddddr</code> (see <a href="EuLisp-0.991/html/eulispcl17.html#dx21-632002"><code>car</code></a>)
</li>
</ul>
</li>
<li id="sec-20.4">Symbol functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-893002"><code>gensym</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-897002"><code>symbol-exists?</code></a>
</li>
</ul>
</li>
<li id="sec-20.5">Vector functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-917005"><code>vector</code></a>
</li>
</ul>
</li>
<li id="sec-20.6">Predicates <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-616007"><code>null?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-628002"><code>atom?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-657013"><code>number?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-626007"><code>cons?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-891002"><code>symbol?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-598002"><code>keyword?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-549021"><code>float?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-497069"><code>double-float?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-589039"><code>integer?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-866002"><code>string?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-920002"><code>vector?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-710012"><code>stream?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-437004"><code>eq</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-441002"><code>eql</code></a>
</li>
</ul>
</li>
<li id="sec-20.7">Arithmetic functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-679002"><code>zero?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-685002"><code>positive?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-687002"><code>negative?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-593002"><code>odd?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-591002"><code>even?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-557002"><code>truncate</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-553002"><code>floor</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-551002"><code>ceiling</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-555002"><code>round</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-677002"><code>abs</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-673002"><code>gcd</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-675002"><code>lcm</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-661004"><code>+</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-663002"><code>-</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-665002"><code>*</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-667002"><code>/</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-466002"><code>min</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-464002"><code>max</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-527002"><code>sin</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-525003"><code>cos</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-529002"><code>tan</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-519003"><code>asin</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-517002"><code>acos</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-521003"><code>atan</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-537002"><code>exp</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-545004"><code>sqrt</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-543004"><code>pow</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-539003"><code>log</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-691002"><code>binary+</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-693002"><code>binary-</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-695002"><code>binary*</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-697002"><code>binary/</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-703003"><code>binary-gcd</code></a>
</li>
<li>
<code>binary%</code>
</li>
</ul>
</li>
<li id="sec-20.8">Numeric comparison functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>=
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-452002">===</a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-458002"><code>&gt;</code></a>=
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-458002"><code>&gt;</code></a>
</li>
</ul>
</li>
<li id="sec-20.9">I/O functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-780002"><code>read</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-803002"><code>swrite</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-807002"><code>write</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-819002"><code>sprin</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-823002"><code>prin</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-827002"><code>sprint</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-831002"><code>print</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-835002"><code>snewline</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-838002"><code>newline</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-841002"><code>sflush</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-844002"><code>flush</code></a>
</li>
</ul>
</li>
<li id="sec-20.10">Format <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-581002"><code>sformat</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-583002"><code>format</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-585002"><code>fmt</code></a>
</li>
</ul>
</li>
<li id="sec-20.11">File I/O functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-854002"><code>open-input-file</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-856002"><code>open-output-file</code></a>
</li>
</ul>
</li>
<li id="sec-20.12">Standard streams <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-749002"><code>stdin</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-751002"><code>stdout</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-752002"><code>stderr</code></a>
</li>
</ul>
</li>
<li id="sec-20.13">Plus some others <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-210002"><code>t</code></a>
</li>
<li>
<code>else</code>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-143002"><code>ticks-per-second</code></a>
</li>
</ul>
</li>
<li id="sec-20.14">Thread <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-121003"><code>&lt;thread&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-160002"><code>&lt;simple-thread&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-122002"><code>thread?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-124002"><code>thread-reschedule</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-127002"><code>current-thread</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-127002"><code>current-thread</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-128002"><code>thread-start</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-131002"><code>thread-value</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-150003"><code>&lt;lock&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-150007"><code>lock?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-152002"><code>lock</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-156002"><code>unlock</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-135002"><code>wait</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-272002"><code>let/cc</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl15.html#dx19-192002"><code>with-handler</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-299002"><code>unwind-protect</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl15.html#dx19-186003"><code>signal</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl15.html#dx19-198002"><code>error</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl15.html#dx19-201002"><code>cerror</code></a>
</li>
</ul>
</li>
<li id="sec-20.15">Telos <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-1022002"><code>allocate</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-76003"><code>&lt;object&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-76007"><code>&lt;class&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-970002"><code>&lt;simple-class&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-615006"><code>&lt;list&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-626002"><code>&lt;cons&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-616003"><code>&lt;null&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-657010"><code>&lt;number&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-589035"><code>&lt;integer&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-560035"><code>&lt;fpi&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-549017"><code>&lt;float&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-497061"><code>&lt;double-float&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-890006"><code>&lt;symbol&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-597006"><code>&lt;keyword&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-864017"><code>&lt;string&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-709002"><code>&lt;stream&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-918006"><code>&lt;vector&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-910005"><code>&lt;table&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-916002"><code>&lt;hash-table&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-84002"><code>&lt;function&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-84006"><code>&lt;simple-function&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-1002008"><code>&lt;method&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-1002011"><code>&lt;simple-method&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-977002"><code>&lt;slot&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl18.html#dx23-977005"><code>&lt;local-slot&gt;</code></a>
</li>
<li>
<code>generic-print</code>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-796002"><code>generic-write</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl12.html#dx16-135002"><code>wait</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-104004"><code>make</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl11.html#dx13-110002"><code>initialize</code></a>
</li>
</ul>
</li>
<li id="sec-20.16">Setter <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-249002"><code>setter</code></a>
</li>
</ul>
</li>
<li id="sec-20.17">Converter <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-475002"><code>converter</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-469004"><code>convert</code></a>
</li>
</ul>
</li>
<li id="sec-20.18">Condition <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl14.html#dx18-167002"><code>condition?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl14.html#dx18-165002"><code>&lt;condition&gt;</code></a>
</li>
</ul>
</li>
<li id="sec-20.19">Compare <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-449002"><code>binary&lt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-444002"><code>binary=</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-452002">===</a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-458002"><code>&gt;</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-456002"><code>&lt;</code></a>=
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-458002"><code>&gt;</code></a>=
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-464002"><code>max</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-466002"><code>min</code></a>
</li>
</ul>
</li>
<li id="sec-20.20">Defining Syntax <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-305004"><code>quasiquote</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-308002"><code>unquote</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl16.html#dx20-311002"><code>unquote-splicing</code></a>
</li>
</ul>
</li>
<li id="sec-20.21">Collect <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-362002"><code>collection?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-409002"><code>sequence?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-348020"><code>accumulate</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-351002"><code>accumulate1</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-354002"><code>all?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-358002"><code>any?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-365002"><code>concatenate</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-369002"><code>delete</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-372002"><code>do</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-375002"><code>element</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-380002"><code>empty?</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-383002"><code>fill</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-395002"><code>map</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-398002"><code>member</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-401002"><code>remove</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-404002"><code>reverse</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-412002"><code>size</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-415002"><code>slice</code></a>
</li>
</ul>
</li>
<li id="sec-20.22">Copy <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-482004"><code>deep-copy</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-489002"><code>shallow-copy</code></a>

</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-21" class="outline-2">
<h2 id="sec-21"><span class="section-number-2">21</span> EuXLisp functions </h2>
<div class="outline-text-2" id="text-21">

<p>Here is a summary of the additional functions available in EuXLisp. Those
marked '*' are also in Youtoo.
</p><ul>
<li id="sec-21.1">List functions <br/>
<ul>
<li>
<code>append</code> *
</li>
<li>
<code>length</code> -&gt; <code>list-size</code> *
</li>
<li>
<code>list-ref</code> *
</li>
</ul>
</li>
<li id="sec-21.2">Vector functions <br/>
<ul>
<li>
<code>make-vector</code> *
</li>
<li>
<code>vector-length</code> -&gt; <code>vector-size</code> *
</li>
<li>
<code>vector-ref</code> *
</li>
</ul>
</li>
<li id="sec-21.3">Predicates <br/>
<ul>
<li>
<code>list?</code> *
</li>
<li>
<code>function?</code> *
</li>
<li>
<code>input-stream?</code>
</li>
<li>
<code>output-stream?</code>
</li>
<li>
<code>object?</code> *
</li>
<li>
<code>eof-object?</code>
</li>
<li>
<code>default-object?</code>
</li>
</ul>
</li>
<li id="sec-21.4">Arithmetic functions <br/>
<ul>
<li>
<code>random</code> *
</li>
</ul>
</li>
<li id="sec-21.5">String functions <br/>
<ul>
<li>
<code>make-string</code>
</li>
<li>
<code>string-length</code> -&gt; <code>string-size</code> *
</li>
<li>
<code>string-null?</code> -&gt; <code>string-empty?</code> *
</li>
<li>
<code>string-append</code> *
</li>
<li>
<code>string-ref</code> *
</li>
<li>
<code>substring</code> *
</li>
</ul>
</li>
<li id="sec-21.6">I/O functions <br/>
<ul>
<li>
<code>read-char</code> *
</li>
<li>
<code>read-byte</code>
</li>
<li>
<code>read-short</code>
</li>
<li>
<code>read-long</code>
</li>
<li>
<code>write-char</code>
</li>
<li>
<code>write-byte</code>
</li>
<li>
<code>write-short</code>
</li>
<li>
<code>write-long</code>
</li>
<li>
<code>char-ready?</code>
</li>
<li>
<code>peek-char</code>
</li>
</ul>
</li>
<li id="sec-21.7">Print control functions <br/>
<ul>
<li>
<code>print-breadth</code>
</li>
<li>
<code>print-depth</code>
</li>
</ul>
</li>
<li id="sec-21.8">File I/O functions <br/>
<ul>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-854002"><code>open-input-file</code></a>
</li>
<li>
<a href="EuLisp-0.991/html/eulispcl17.html#dx21-856002"><code>open-output-file</code></a>
</li>
<li>
<code>open-append-file</code>
</li>
<li>
<code>open-update-file</code>
</li>
<li>
<code>close-stream</code>
</li>
<li>
<code>close-input-stream</code>
</li>
<li>
<code>close-output-stream</code>
</li>
<li>
<code>get-file-position</code>
</li>
<li>
<code>unlink</code>
</li>
</ul>
</li>
<li id="sec-21.9">utility functions <br/>
<ul>
<li>
<code>transcript-on</code>
</li>
<li>
<code>transcript-off</code>
</li>
<li>
<code>getarg</code>
</li>
<li>
<code>prompt?</code>
</li>
<li>
<code>exit</code> *
</li>
<li>
<code>compile</code> *
</li>
<li>
<code>decompile</code>
</li>
<li>
<code>gc</code>
</li>
<li>
<code>save</code>
</li>
<li>
<code>restore</code>
</li>
</ul>
</li>
<li id="sec-21.10">Debugging functions <br/>
<ul>
<li>
<code>trace-on</code>
</li>
<li>
<code>trace-off</code>
</li>
</ul>
</li>
<li id="sec-21.11">Module functions <br/>
<ul>
<li>
<code>enter-module</code>
</li>
<li>
<code>!&gt;</code>
</li>
<li>
<code>reenter-module</code>
</li>
<li>
<code>!&gt;&gt;</code>
</li>
<li>
<code>module-symbols</code>
</li>
<li>
<code>module-exports</code>
</li>
<li>
<code>symbol-module</code>
</li>
<li>
<code>current-module</code>
</li>
<li>
<code>module-list</code>
</li>
<li>
<code>unintern</code>
</li>
</ul>
</li>
<li id="sec-21.12">Tables <br/>
<ul>
<li>
<code>make-table</code>
</li>
<li>
<code>table-ref</code> *
</li>
<li>
<code>table-comparator</code> *
</li>
<li>
<code>table-delete</code>
</li>
<li>
<code>table-length</code>
</li>
<li>
<code>table-keys</code> *
</li>
<li>
<code>table-values</code> *
</li>
<li>
<code>table-fill</code>
</li>
<li>
<code>table-clear</code>
</li>
</ul>
</li>
<li id="sec-21.13">Plus some others <br/>
<ul>
<li>
<code>binary</code>
</li>
<li>
<code>text</code>
</li>
<li>
<code>not</code> *
</li>
<li>
<code>prin1</code>
</li>
<li>
<code>princ</code>
</li>
<li>
<code>eval</code>
</li>
<li>
<code>system</code> *
</li>
<li>
<code>getenv</code> *
</li>
<li>
<code>putenv</code>
</li>
<li>
<code>tmpfile</code>
</li>
<li>
<code>current-time</code>
</li>
<li>
<code>backtrace</code> *
</li>
<li>
<code>backtrace?</code>
</li>
</ul>
</li>
<li id="sec-21.14">Thread <br/>
<ul>
<li>
<code>make-thread</code>
</li>
<li>
<code>thread-kill</code>
</li>
<li>
<code>thread-queue</code>
</li>
<li>
<code>thread-state</code>
</li>
<li>
<code>&lt;thread-condition&gt;</code>
</li>
<li>
<code>&lt;thread-error&gt;</code>
</li>
<li>
<code>&lt;thread-already-started&gt;</code>
</li>
<li>
<code>&lt;simple-lock&gt;</code>
</li>
<li>
<code>make-lock</code>
</li>
<li>
<code>&lt;lock-condition&gt;</code>
</li>
<li>
<code>&lt;lock-error&gt;</code>
</li>
<li>
<code>&lt;wait-condition&gt;</code>
</li>
<li>
<code>&lt;wait-error&gt;</code>
</li>
<li>
<code>&lt;wrong-condition-class&gt;</code>
</li>
</ul>
</li>
<li id="sec-21.15">Telos <br/>
<ul>
<li>
<code>&lt;simple-string&gt;</code>
</li>
<li>
<code>&lt;input-stream&gt;</code>
</li>
<li>
<code>&lt;output-stream&gt;</code>
</li>
<li>
<code>&lt;i/o-stream&gt;</code>
</li>
<li>
<code>&lt;simple-vector&gt;</code>
</li>
<li>
<code>&lt;char&gt;</code>
</li>
<li>
<code>&lt;simple-char&gt;</code>
</li>
<li>
<code>&lt;promise&gt;</code>
</li>
<li>
<code>&lt;subr&gt;</code>
</li>
<li>
<code>&lt;continuation&gt;</code>
</li>
<li>
<code>&lt;generic&gt;</code>
</li>
<li>
<code>&lt;simple-generic&gt;</code>
</li>
<li>
<code>class-hierarchy</code>
</li>
<li>
<code>describe</code>
</li>
<li>
<code>class?</code> *
</li>
<li>
<code>subclass?</code> *
</li>
</ul>
</li>
<li id="sec-21.16">Converter <br/>
<ul>
<li>
<code>&lt;conversion-condition&gt;</code>
</li>
<li>
<code>&lt;no-converter&gt;</code>
</li>
</ul>
</li>
<li id="sec-21.17">Condition <br/>
<ul>
<li>
<code>condition-message</code> *
</li>
<li>
<code>condition-value</code>
</li>
<li>
<code>&lt;telos-condition&gt;</code>
</li>
<li>
<code>&lt;telos-error&gt;</code>
</li>
<li>
<code>&lt;telos-general-error&gt;</code>
</li>
<li>
<code>&lt;telos-bad-ref&gt;</code>
</li>
<li>
<code>&lt;no-applicable-method&gt;</code>
</li>
<li>
<code>&lt;no-next-method&gt;</code>
</li>
<li>
<code>&lt;incompatible-method-domain&gt;</code>
</li>
<li>
<code>&lt;arithmetic-condition&gt;</code>
</li>
<li>
<code>&lt;arithmetic-error&gt;</code>
</li>
<li>
<code>&lt;error&gt;</code>
</li>
<li>
<code>&lt;general-error&gt;</code>
</li>
<li>
<code>&lt;bad-type&gt;</code>
</li>
<li>
<code>&lt;unbound-error&gt;</code>
</li>
<li>
<code>&lt;compilation-error&gt;</code>
</li>
<li>
<code>&lt;defsyntax-error&gt;</code>
</li>
<li>
<code>&lt;syntax-error&gt;</code>
</li>
<li>
<code>&lt;user-interrupt&gt;</code>
</li>
<li>
<code>&lt;collection-condition&gt;</code>
</li>
<li>
<code>&lt;collection-error&gt;</code>
</li>
</ul>
</li>
<li id="sec-21.18">Syntax expansion <br/>
<ul>
<li>
<code>expand-syntax</code>
</li>
<li>
<code>expand-syntax-1</code>

</li>
</ul>
</li>
</ul>
</div>

</div>

<div id="outline-container-22" class="outline-2">
<h2 id="sec-22"><span class="section-number-2">22</span> Command Line Arguments </h2>
<div class="outline-text-2" id="text-22">

<ul>
<li id="sec-22.1">EuXLisp <br/>
<ul>
<li>
<code>-h</code>, <code>--help</code> Display this usage information.
</li>
<li>
<code>-q</code>, <code>--quiet</code> Print no messages, prompts or values.
</li>
<li>
<code>-n</code>, <code>--no-image</code> Do not read in the initial Lisp image.
</li>
<li>
<code>-N</code>, <code>--no-sys-calls</code> Disable system calls.
</li>
<li>
<code>-s</code> <i>file</i>, <code>--script</code> <i>file</i> Read and execute script from <i>file</i>, see
below.
</li>
<li>
<code>-m</code> <i>file</i>, <code>--module</code> <i>file</i> Read and execute module from <i>file</i>.
</li>
<li>
<code>-i</code> <i>file</i>, <code>--image</code> <i>file</i> Read the given image <i>file</i> rather than the
default.
</li>
<li>
<code>-t</code>, <code>--trace</code> Switch on byte-code level tracing.

</li>
</ul>

<p>Other arguments are passed to the intepreter and are available as <code>(getarg 0)</code> (the name of the program), <code>(getarg 1)</code> (first argument), <code>(getarg 2)</code>
(second argument), and so on. The function <code>getarg</code> returns <a href="EuLisp-0.991/html/eulispcl17.html#dx21-615010"><code>()</code></a> for a
non-existent argument.
</p>
</li>
</ul>
</div>

</div>

<div id="outline-container-23" class="outline-2">
<h2 id="sec-23"><span class="section-number-2">23</span> Shell Scripts </h2>
<div class="outline-text-2" id="text-23">

<ul>
<li id="sec-23.1">EuXLisp <br/>
can be used in a shell script by means of the <code>--script</code> flag:



<pre class="src src-eulisp">#!&lt;absolute path&gt;/euxlisp --script

<span style="color: #0000ff; font-weight: bold;">(print</span> <span style="color: #00ff00;">"hello world"</span>)
</pre>



<p>
It is usual to use the <code>-q</code> or <code>--quiet</code> flag to prevent the echo from the
read-eval-print loop (the default), and the <code>-N</code> or <code>--no-sys-calls</code> flag to
prevent the use of the system function.
</p>


<pre class="src src-eulisp">#!/usr/local/bin/euxlisp -qN --script

<span style="color: #0000ff; font-weight: bold;">(print</span> <span style="color: #00ff00;">"hello world"</span>)
</pre>




</li>
<li id="sec-23.2">Youtoo <br/>
can also be used in a shell script by means of the <code>--script</code> flag:



<pre class="src src-eulisp">#!&lt;absolute path&gt;/youtoo --script

<span style="color: #0000ff; font-weight: bold;">(print</span> <span style="color: #00ff00;">"hello world"</span>)
</pre>



<p>
See <i>Examples/Misc/script.em</i>.
</p></li>
</ul>
</div>
</div>
<div id="postamble">
<p class="author"> Author: of original Euscheme notes Russell Bradford
<a href="mailto:no-reply">&lt;no-reply&gt;</a>
</p>
<p class="date"> Date: 2011-02-27 17:11:53 GMT</p>
<p class="creator">HTML generated by org-mode 6.33x in emacs 23</p>
</div>
</div>
</body>
</html>
Something went wrong with that request. Please try again.