Created
          February 13, 2025 18:27 
        
      - 
      
- 
        Save aarzilli/6d5e333292b0df37991652dbdc5be901 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var Builtins = []*Function{ | |
| ... | |
| { | |
| Name: "first", | |
| Fast: Len, | |
| Func: initializeBuiltins("first"), | |
| ... | |
| } | |
| ... | |
| } | |
| func initializeBuiltins(name string) func(args ...any) (any, error) { | |
| return func(args ...any) (any, error) { | |
| Builtins[Index["first"]].Func = realFirstFunc | |
| Builtins[Index["last"]].Func = realLastFunc | |
| ... | |
| return Builtins[Index[name]](args...) | |
| } | |
| } | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment