Skip to content

Matching on constants in a bitstring case expression #2333

Discussion options

You must be logged in to vote

Hello! In Gleam we don't have one syntax for both equality and also for assigning variables, so instead guards are used.

<<m, a:4, f:4>> if m == marker_prefix && a == app_marker && f == frame_marker -> todo

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Xetera
Comment options

Answer selected by Xetera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants