nix-helpers: fae0186cd8a8a4f3f8433d4fdb2749bf99bf9704

     1: # True if the list xs is a suffix of the list ys, or vice versa
     2: { lib, reverse }:
     3: 
     4: with builtins;
     5: with lib;
     6: xs: ys:
     7: with rec {
     8:   lx = length xs;
     9:   ly = length ys;
    10:   minlen = if lx < ly then lx else ly;
    11: };
    12: take minlen (reverse xs) == take minlen (reverse ys)

Generated by git2html.