Skip to content
Snippets Groups Projects
  1. Apr 03, 2016
    • Jan Moringen's avatar
      use implementation's EMPTYP when available · afaf1a16
      Jan Moringen authored
      Using the implementation's EMPTYP has the potential advantage of
      supporting user-defined sequence types (as is the case with SBCL).
      
      This commit tests for SEQUENCE:EMPTYP and defines ALEXANDRIA:EMPTYP in
      terms of it.
      
      For implementations that do not provide SEQUENCE:EMPTYP, nothing
      changes.
      afaf1a16
    • Jan Moringen's avatar
      use EMPTYP instead of e.g. PLUSP and LENGTH were appropriate · 8b89a71b
      Jan Moringen authored
      EMPTYP usually (except, maybe, for some user-defined sequence types) has
      two advantages:
      
      1. it has O(1) runtime while LENGTH can be O(n)
      
      2. it can work on user-defined, infinite sequences (given implementation
         support and integration of ALEXANDRIA:EMPTYP with the
         implementation's mechanism as is the case for SBCL)
      8b89a71b
    • Jan Moringen's avatar
      add READ-STREAM-CONTENT-INTO-{STRING,BYTE-VECTOR} · dce97236
      Jan Moringen authored
        export and document them
      
        use them in READ-FILE-INTO-{STRING,BYTE-VECTOR}
      
        no smoke test for READ-STREAM-CONTENT-INTO-BYTE-VECTOR due to lack of
        something like WITH-INPUT-FROM-BYTE-VECTOR
      dce97236
  2. Apr 02, 2016
  3. Apr 27, 2015
  4. Jul 30, 2014
  5. May 12, 2014
  6. Mar 04, 2014
  7. Feb 16, 2014
  8. Jan 26, 2013
  9. Apr 26, 2012
    • Nikodemus Siivola's avatar
      tweak EXTREMUM · 0c39310e
      Nikodemus Siivola authored
       Return NIL if the sequence is empty, instead of the NO-EXTREMUM nonsense.
      
       It was bad design, because it's not an error someone higher up the stack can
       sensibly handle, and handling it locally is too verbose and slow.
      
          (or (extremum ...) (error ...))
      
       expresses the common case succintly, and fits the pattern of existing
       sequence functions.
      
       If it is deemed necessary, we can also add &KEY DEFAULT, but that seems
       overkill and has little precedent in sequence functions.
      0c39310e
  10. Apr 25, 2012
  11. Apr 22, 2012
  12. Mar 30, 2012
  13. Mar 07, 2012
  14. Mar 02, 2012
  15. Jan 20, 2012
    • tpapp's avatar
      generic MEAN and MEDIAN, new function DISPLACE-ARRAY · 485544d4
      tpapp authored
       Objects other than sequences have means and medians (eg probability
       distributions, arrays, sequences/arrays wrapped in another object, etc), so
       it makes sense to make these functions generic.
      
       DISPLACE-ARRAY is a small utility function that is used in the implementation
       of MEDIAN for arrays, but is also of general utility because it makes the
       creation of displaced arrays simpler, dispensing with the need to specify the
       element type, and offering sensible defaults when one wants vectors.
      
       Also added tests for all the new functions/methods.
      485544d4
    • Jyrki Jaakkola's avatar
      36800ad1
    • Ryan Davis's avatar
      convert ENSURE-GETHASH into a macro · d92432dd
      Ryan Davis authored
       Evaluate the default-form only if we actually use it.
      d92432dd
  16. Nov 09, 2011
  17. Nov 02, 2011
  18. Oct 29, 2011
Loading