Example project directory, the root folders are pretty consistent, the sub directories (on lib
, etc) are just examples of what might be in there.
.
├── lib
│ ├── db
│ ├── handlers
│ └── routes
// This F# dojo is directly inspired by the | |
// Digit Recognizer competition from Kaggle.com: | |
// http://www.kaggle.com/c/digit-recognizer | |
// The datasets below are simply shorter versions of | |
// the training dataset from Kaggle. | |
// The goal of the dojo will be to | |
// create a classifier that uses training data | |
// to recognize hand-written digits, and | |
// evaluate the quality of our classifier |
I don't know why, but this morning I felt like exploring function curry-ing and writing a little bit about it. First I watched a video on curry-ing from the JS Weekly newletter. Then I wanted to write my own implementation. After that I thought I would share what I did with my team at work and then this.
Brain-dump over.
The only reason I created two different implementations is becuase semantically I think that a function is only curried once; as I understand it - to curry - is a process by which you convert a single function which takes multiple arguments into a series of multiple functions each taking exactly one argument.
So, while the implementations work identically from the point of view of the user the differ in their implementation; basically only semantically.
import React, { useCallback, useState, useEffect, useContext, createContext } from 'react' | |
const authContext = createContext() | |
// Hook for child components to get the auth object and re-render when it changes. | |
export default () => { | |
return useContext(authContext) | |
} | |
// Provider component that wraps components and makes useAuth() available |