Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  case let .DoubleCombine(s, _, _): return s
Is the underscore a special character in this case to tell the compiler not to read in the value of those arguments? Or is it actually loading in "second" and then "value" into an argument named _?


Assuming it's the same as other pattern matching langs it is a wildcard that signals the intent that you don't care about what value those would be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: