Skip to content

Instantly share code, notes, and snippets.

@built
Created March 2, 2012 02:43
Show Gist options
  • Select an option

  • Save built/1955147 to your computer and use it in GitHub Desktop.

Select an option

Save built/1955147 to your computer and use it in GitHub Desktop.
First naive (n^2) PDXErlang intersection implementation
-module(larray).
-include_lib("eunit/include/eunit.hrl").
-export([intersection/2]).
intersection(ListA, ListB) ->
[X || X <- ListA, lists:member(X, ListB)].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment