> I have not seen others use Nim this way, what examples are there?
    
    
    from std/random import randomize, sample
    
    randomize()
    
    type
      ✊🤚✌️ = enum
        ✊, 🤚, ✌️
      🏆     = enum
        👈, 🤷, 👉
    
    proc `>`(👤, 👥: ✊🤚✌️): bool =
      👤 == 🤚 and 👥 == ✊ or
      👤 == ✌️ and 👥 == 🤚 or
      👤 == ✊ and 👥 == ✌️
    
    proc 👋(👤, 👥: ✊🤚✌️): 🏆 =
      if   👤 == 👥: 🤷
      elif 👤 >  👥: 👈
      else:          👉
    
    proc 🆚(👤, 👥: ✊🤚✌️): void =
      echo(👤, "  ", 👤.👋 👥 , "  ", 👥)
    
    template ❓: ✊🤚✌️ =
      sample([✊, 🤚, ✌️])
    
    ✊.🆚 ✊
    🤚.🆚 ✊
    ✌️.🆚 ✊
    ✊.🆚 🤚
    🤚.🆚 🤚
    ✌️.🆚 🤚
    ✊.🆚 ✌️
    🤚.🆚 ✌️
    ✌️.🆚 ✌️
    ❓.🆚 ✊
    ✊.🆚 ❓
    ❓.🆚 ❓
    
    
    Run

Reply via email to