병합 된 시퀀스에 요소가 정렬되도록 스칼라에서 두 개의 날짜 시퀀스를 병합하려고합니다. 다음과 같이 나는 isBefore의 부분적인 구현을 사용하고 있습니다 :부분적으로 스칼라의 isBefore 함수가 오류를 발생합니다.
val seq1 = Seq(LocalDate.of(2014, 4, 5), LocalDate.of(2013, 6 ,7), LocalDate.of(2014, 3, 1))
val seq2 = Seq(LocalDate.of(2012, 2, 2), LocalDate.of(2015, 2, 1))
var arr = (seq1 ++ seq2).sortWith(_.isBefore(_) = 1)
println(arr)
을하지만 그것은 isBefore 기능에 대한 컴파일 오류를 보여줍니다
Multiple markers at this line
- missing arguments for method isBefore in class LocalDate; follow this method with `_' if you want to
treat it as a partially applied function
- missing arguments for method isBefore in class LocalDate; follow this method with `_' if you want to
treat it as a partially applied function
내가 스칼라 비교적 새로운입니다. 무슨 문제가있는 것 같습니까?