본문 바로가기

개발/typescript, web24

[21-07-08 개인스터디] fp-ts: semigroup 이론적으로 나에게 가장 도움이 된 글은 이 글이였다. https://www.johndcook.com/blog/2018/07/08/weak-groups/ Weak groups: semigroups, monoids, quasigroups, loops, etc. Weakening the axioms of a group give a variety of other structures: associative or not, with or without identity elements, with or without division, etc. www.johndcook.com fp-ts에서 semigroup은 이 Magma의 instance 중 하나이다. fp-ts에서 semigroup은 닫혀있는(closed) 이항 연산.. 2021. 6. 27.
[21-06-27 개인스터디] fp-ts: Ord Eq에서 제한된 형태이므로 Eq글을 먼저 보고 오는 것을 추천한다. https://gggururu.tistory.com/82 HTML 삽입 미리보기할 수 없는 소스 여러개의 Ord를 Semigroup을 통한 조합 result myUserArr [ User { name: '라영', age: 10 }, User { name: '나영', age: 12 }, User { name: '가영', age: 14 }, User { name: '다영', age: 14 }, User { name: '라영', age: 17 } ] 1순위 나이순, 2순위 name순으로 처럼 Ord를 조합할 수 있다. 2021. 6. 27.
[21-06-23 사내모각코] pipeline에서 각 함수의 결과를 측정하여 처리할 수 있게 하는 작업 pipeline에서의 함수 체이닝시 각각의 결과를 lazy하게 측정하여 해당 결과를 통해 다양한 처리를 할 수 있도록 해봤어요. 어제 말씀드린 카테고리 이론 관련하여 기초적인 내용들 쉽게 작성한 글이 있어서 올려봐요! 지금 보니 제가 설명한게 좀 틀린게 있네욤.. https://evan-moon.github.io/2020/01/27/safety-function-composition/ 그리고 제가 한건 그 각 함수가 연결되어 실행하는 로직을 generator함수로 감싸서 lazy하게 실행할 수 있게 하고 밑에 conveyorLogger 같은 lazy한 처리를 관찰하고 처리하는 처리기를 따로 둔 것이 제가 한거에요. 예를 들어 중간에 Except가 리턴되면 처리기가 해당 Except를 확인하여 남은 pipe.. 2021. 6. 23.
[21-06-18 개인스터디] fp-ts Eq 알아보기 + combinators pattern, contramap reference) contravariant https://hackage.haskell.org/package/contravariant-1.4.1/docs/Data-Functor-Contravariant.html Data.Functor.Contravariant Replace all locations in the output with the same value. The default definition is contramap . const, but this may be overridden with a more efficient version. hackage.haskell.org combinators pattern https://wiki.haskell.org/Combinator Combinator - Hask.. 2021. 6. 19.