Re: Feature for next Eu
- Posted by Jason Gade <jgade at NETZERO.NET> Nov 12, 1999
- 525 views
Hey, Rod. I'm with you here, both on the "add syntax" thing and on the SEQUENCE.E thing. One function that is needed is the 'sum' function. J. -----Original Message----- From: Roderick Jackson <rjackson at CSIWEB.COM> To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU> Date: Thursday, November 11, 1999 3:12 PM Subject: Feature for next Eu >Well, it looks like the 'add-this-syntax' thread has returned... > >I think I've made my views on most of the ideas presented in >the thread known already ("no", for the most part.) > >However, I wish to present the case for something that should >be simpler, a lot less controversial, and not requiring the >grafting of a new paradigm into the language: > > The 'remove' function. > >Basically, it would work like so... > > x = {1,2,3,4,5} > > x = remove (x,3) -- x is now {1,2,4,5} > >Now, I'm not demanding that this be made a new built-in >function. Simply having it stuck in MISC.E would be >fine (although honestly, it might be time for a >SEQUENCE.E file.) > >The reason I ask for it is because I find myself having >to rewrite the function for numerous programs and >libraries. And of course, I usually make it local in >any code I release... I figure that if *I* need it, >other people's code that mine is to work with might >have the function as well. Having several local copies >of the same function, which is what I'm running into, >usually shows that there's a better way to do things... > >In short, I think this would be a very nice addition to >the next release's MISC.E file. > >(BTW - as to what other routines to include in a >SEQUENCE.E file, should the idea be taken seriously, I >would suggest: > > insert (s,x,3) --> s[1..2] & x & s[3..length(s)] > last (s,5) --> the last 5 elements of s > reverse (s) --> moved from MISC.E > sort (s) --> moved from SORT.E > custom_sort (s) --> moved from SORT.E > dsort (s) --> descending; eliminates 'call_func' > bfind (x,s) --> find within a sorted sequence) > > >Rod Jackson > __________________________________________ NetZero - Defenders of the Free World Get your FREE Internet Access and Email at http://www.netzero.net/download/index.html