This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StreamUtil<T>{ | |
public static <T> Stream<T> ofIterable(Iterable<T> iter){ | |
Iterator<T> iterator = iter.iterator(); | |
Stream.Builder<T> builder = Stream.builder(); | |
while(iterator.hasNext()){ | |
builder.add(iterator.next()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module x | |
let list = [-1;0;1;2;3;4;5;6;7;8;9] |> List.toArray | |
let target = [1;2;3] |> List.toArray | |
let nope = [4;1;2] |> List.toArray | |
/// <summary> | |
/// Sequenes are basically IEnumerable, so you can't do structural equality on them | |
/// this is why they are converted to an F# list before doing comparison, otherwise | |
/// their references are compared |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let result = test parserStream video | |
let moov = List.find(function | MOOV(x) -> true | _ -> false) result | |
let sttsElements = | |
match moov with | |
| MOOV(l) -> | |
List.filter (function | TRAK(_) -> true | _ -> false) l | |
|> List.map (function | TRAK(l) -> l) | |
|> List.collect id |
NewerOlder