source: to-imperative/trunk/samples/select4.rf @ 2049

Last change on this file since 2049 was 1684, checked in by orlov, 16 years ago
  • New samples.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 409 bytes
Line 
1$use StdIO;
2
3$func  MkArg  eString = ePrefixes;
4$func? Select (eXs) eSets = eXs-or-sFail;
5
6Main =
7  <MkArg '1234567890ab'> :: e.Prefixes,
8  <PrintLN e.Prefixes>,
9  <Select () e.Prefixes> :: eXs-or-sFail,
10  <PrintLN eXs-or-sFail>;
11
12MkArg {
13  e1 sx = (e1 sx) <MkArg e1>;
14  = ;
15};
16
17Select \{
18  (en) e.Sets, e.Sets : \{
19    = en;
20    (e1 sa e2) e.Sets1, # \{ en : e3 sa e4; }, <Select (en sa) e.Sets1>;
21  };
22};
23
Note: See TracBrowser for help on using the repository browser.