<commit_before>---
layout: post
title:  "Tuple syntax"
date:   2016-03-03 03:50:58 -0600
categories: tuple
---
Example tuple syntax

{% highlight elixir %}
{:ok, 1, "a"}

# pattern match
{:ok, result} = {:ok, "good"}

# empty tuple<commit_msg>Fixup tuple syntax<commit_after>---
layout: post
title:  "Tuple syntax"
date:   2016-03-03 03:50:58 -0600
categories: tuple
---
This example shows the literal syntax to create a tuple and also how to pattern match.

{% highlight elixir %}
{:ok, 1, "a"}

# pattern match
{:ok, result} = {:ok, "good"}

# this raises a match error
{:ok, result} = {:ok, "good", "one more"}

# empty tuple
{'fraction_non_alphanumeric': 0.16560509554140126, 'fraction_numerical': 0.06050955414012739, 'mean_word_length': 3.952755905511811, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6800979', 'n_tokens_mistral': 255, 'n_tokens_neox': 223, 'n_words': 81}