Skip to content

Type format for CL. #31

@mariari

Description

@mariari

It would be nice if we could request type information from alucard terms in CL functions

(defun reshape (array new-element-type) 
  (with-requested-type array array-type
    (match array-type
      ((array length type)
       (coerce array
              (array
               (* length
                  (cl:- (element-size element-type) (element-size type)))
               new-element-type)))))

with that this code can be made. Meaning that we can offer a more safe way to reshape an array form CL. rather than just doing the math in our head.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions