---
source: compiler-core/src/erlang/tests.rs
expression: "pub fn second(list) { case list { [x, y] -> y z -> 1 } }\npub fn tail(list) { case list { [x, ..xs] -> xs z -> list } }\n            "
---
----- SOURCE CODE
pub fn second(list) { case list { [x, y] -> y z -> 1 } }
pub fn tail(list) { case list { [x, ..xs] -> xs z -> list } }
            

----- COMPILED ERLANG
-module(my@mod).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-export([second/1, tail/1]).

-file("project/test/my/mod.gleam", 1).
-spec second(list(integer())) -> integer().
second(List) ->
    case List of
        [X, Y] ->
            Y;

        Z ->
            1
    end.

-file("project/test/my/mod.gleam", 2).
-spec tail(list(P)) -> list(P).
tail(List) ->
    case List of
        [X | Xs] ->
            Xs;

        Z ->
            List
    end.
