FxDart 101
직접 해 보며 익히는 코스입니다. 모든 수업은 라이브 데모와 플레이그라운드를 갖춘 짧은 강의로 이루어져 있으며, 코드는 실제 Dart 컴파일러로 컴파일되어 브라우저에서 실행됩니다. 섹션을 순서대로 따라가거나, 아래에서 원하는 함수로 바로 이동하세요.
fx →
map →
filter →
take →
toList,
이어서
concurrent.
일:
디바운스 검색
·
한도 있는 동시 fetch.
📖 함수형 프로그래밍 이론 — 이 코스의 바탕이 되는 교과서 →
📒 실제 앱으로 확인하기: Daily Ledger — FxDart로 만든 완성형 앱 →
섹션 1 · 시작하기
파이프라인 모델: 지연 방식으로 구성하고, 종결 연산자로 실행합니다.
섹션 2 · 시퀀스 생성
파이프라인의 출발점이 되는 소스들.
섹션 3 · 변환
각 요소를 다시 빚어냅니다 — 지연 방식으로.
섹션 4 · 필터링 & 중복 제거
필요한 것만 남깁니다.
- where
- whereNot
- nonNulls
- distinct
- distinctBy
- uniqStrict
- uniqAdjacent
- takeUniqBy
- difference
- differenceBy
- intersection
- intersectionBy
- compress
섹션 5 · 잘라내기
윈도우, 앞부분, 뒷부분, 그리고 청크.
- take
- takeLast
- takeWhile
- takeWhileRight
- takeUntilInclusive
- skip
- dropRight
- skipWhile
- dropWhileRight
- dropUntil
- slice
- chunk
- windowed
- pairwise
- split
섹션 6 · 결합
여러 시퀀스를 받아 하나로 내보냅니다.
- append
- prepend
- concat
- zip
- zip3
- zipWith
- indexed
- …WithIndex (map, filter, fold)
- transpose
- reverse
- fork
- tee
- tee3
- ifEmpty
섹션 7 · 집계
파이프라인을 당겨 값을 만들어 내는 종결 연산자들.
- reduce
- fold
- foldRight
- reduceLazy
- sum
- sumBy
- average
- averageBy
- min
- max
- maxBy
- minBy
- count
- join
- groupBy
- groupedBy
- indexBy
- countBy
- foldBy
- foldByOrSkip
- countWhere
- sort
- sortBy
- sortByDesc
- partition
섹션 8 · 접근 & 술어
단일 값을 꺼내고 요소를 검사합니다.
- firstOrNull
- lastOrNull
- elementAtOrNull
- firstWhereOrNull
- indexWhere
- contains
- isEmpty
- every
- any
- predicates (isNull, isString, …)
섹션 9 · 객체(Map) 함수
FxTS의 객체 유틸리티를 Dart Map에 맞게 포팅했습니다.
- fromEntries
- omit
- pick
- omitBy
- pickBy
- prop
- props
- mapValues
- evolve
- compactObject
- resolveProps
- isMatch
- matches
섹션 10 · 함수 유틸리티
조합자와 헬퍼.
- identity
- always
- tap
- apply
- juxt
- fxPipe
- memoize
- negate
- not
- predicate combinators
- when
- unless
- throwError
- throwIf
- cases
- add
- gt · gte · lt · lte
- delay & sleep
- unicodeToList
- curried & uncurried
섹션 11 · 비동기 & 동시성
FxAsyncIterable 모델 — FxDart의 강점.
- toAsync
- async variants (mapAsync, …)
- Stream bridges
- concurrent
- mapConcurrent
- concurrentPool
- retry
- timeout
- using
- concurrent or parallel
- parallel
섹션 12 · 유틸
속도 제한과 난수.
섹션 13 · 타입 있는 에러
Kotlin Arrow의 접근 방식을 이식: either, Raise, bind, ensure, Nel을 이용한 에러 누적, 그리고 파이프라인과 융합된 검증. 일직선 코드, 타입 있는 실패, 래퍼 타워 없음.
- typed errors — full guide
- Either
- Either combinators
- either & Raise scope
- nullable
- NonEmptyList (Nel)
- accumulation (zipOrAccumulate, …)
- Either × pipelines
섹션 14 · 이벤트 스트림 (push)
FxDart의 push 쪽 — 평범한 Dart Stream 위의 Rx 스타일 연산자들, 그리고 pull 파이프라인으로 이어지는 다리.
- fxEvents
- constructors
- peek · whenComplete
- sampleOn
- combineLatest
- withLatestFrom
- switchMap
- mergeMap
- switchLatest
- mergeScan
- race
- waitAll
- combine
- stopOn
- chunkOn
- windowOn
- groupsBy
- spaceBy
- debounceOn
- retryOn
- onErrorResume
- attempt
- mapEither
- separated
- share
- shareReplay
- LiveValue
- FxSubscriptions
- materialize
섹션 15 · 일
표면을 가로지르는 프로그램 — 패키지를 셋이 아니라 하나로 쓰는 이유.