Edix96
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Apontamentos de Paradigmas da Programação ###### tags: `lectures` ## 1. ## 2. _Types_ e _Typeclasses_ ### 2.2. *TypeClasses* Todas as tuplas também fazem parte de _Bounded_ se seus componentes também estiverem nela. ```haskell=1 ghci> :t 20 20 :: (Num t) => t ``` ## 3. Sintaxe em Funções ### _Pattern matching_ (Correspondência de padrões) _Pattern matching_ consiste na expecificação de padrões com os quais alguns dados devem corresponder em conformidade. Ao definir funções, podemos definir corpos de funções separados para diferentes padrões. Podemos padronizar em qualquer tipo de dados - *números, caracteres, listas, tuplas, etc*. **E.g.:** Função que verifica se o nº que fornecemos é sete ou não: ```haskell lucky :: (Integral a) => a -> String lucky 7 = "NÚMERO SORTE SETE!" lucky x = "Desculpa, não tem sorte!" ``` :::info **Descrevendo a função:** pega num valor _Integral_ e devolve uma _String_. Quando o valor de _input_ é 7, a função era devolver a 1ª primeira mensagem. Se o valor de _input_ for diferente de 7, erá devolver a 2ª mensagem. ::: Quando utilizamos a função `luck`, os padrões serão verificados de cima para baixo. Quando esta estiver em conformidade com o padrão definido, o corpo da função correspondente será usado (nestes caso apenas os corpos apenas são constituidos por _String_). :::danger Podemos definir quandos padrões quisermos: ```haskell sayMe :: (Integral a) => a -> String sayMe 1 = "Um!" sayMe 2 = "Dois!" sayMe 3 = "Três!" sayMe 4 = "Quatro!" sayMe 5 = "Cinco!" sayMe x = "Não entre 1 e 5" ``` Observe que, se movêssemos o último padrão (o mais abrangente) para o topo, ele sempre diria "Não entre 1 e 5" , porque captaria todos os números e eles não teriam a oportunidade de ser verificados pelos outros padrões. ::: Aquando da expeficicação da função factorial podemos observar a implementação da _Pattern matching_ e da recursividade: ```haskell fatorial :: (Integral a) => a -> a fatorial 0 = 1 fatorial n = n * fatorial (n - 1) ``` :::info **Descrevendo a função:** Como recurso a _Pattern matching_ defenimos inicialmente o valor factorial de 0, que vai ser igual a 1, e de seguida definimos a factorial dos restantes números, com recurso a recursividade. ::: De modo geral o que acontece na função anterior é o seguinte: digamos que queremos obter o fatorial de 3. O _Haskell_ era tentar tenta calcular `3 * fatorial 2`. O fatorial de 2 é `2 * fatorial 1`, então, por enquanto, temos `3 * (2 * fatorial 1)`. Fatorial 1 é `1 * fatorial 0`, por fim temos `3 * (2 * (1 * fatorial 0))`. **Portanto, o resultado final é equivalente a 3 * (2 * (1). * 1))** Se tivéssemos escrito o segundo padrão em cima do primeiro, ele pegaria todos os números, incluindo 0 e o cálculo nunca terminaria. É por isso que a ordem é importante ao especificar padrões. **É sempre melhor especificar os mais específicos primeiro e depois os mais gerais mais tarde.** A correspondência de padrões também pode ser usada em **tuplas**. E se quiséssemos criar uma função que pegue em dois vetores do espaço 2D (que estão na forma de pares) e os adicione? Para adicionar dois vetores, adicionamos os seus componentes x separadamente e depois seus componentes e separadamente. Eis como teríamos feito isso se não soubéssemos sobre a correspondência de padrões: ```haskell addVectors :: (Num a) => (a, a) -> (a, a) -> (a, a) addVectors a b = (fst a + fst b, snd a + snd b) ``` Bem, isso funciona, mas há uma maneira melhor de fazer isso. Vamos modificar a função para que ela use a correspondência de padrões: ```haskell addVectors :: (Num a) => (a, a) -> (a, a) -> (a, a) addVectors (x1, y1) (x2, y2) = (x1 + x2, y1 + y2) ``` `fst` e `snd` extraem os componentes dos pares. Mas e os triplos? Bem, não há funções fornecidas que façam isso, mas podemos criar nossas próprias: ```haskell primeiro :: (a, b, c) -> a primeiro (x, _, _) = x segundo :: (a, b, c) -> b segundo (_, y, _) = y terceiro :: (a, b, c) -> c terceiro (_, _, z) = z ``` :::info O `_` significa o mesmo que nas compreensões de lista. Isso significa que realmente não nos importamos com o que é essa parte, então apenas escrevemos um `_` . ::: Também podemos utilizar _Pattern matching_ em Compreensões de lista: ```haskell ghci> let xs = [(1,3), (4,3), (2,4), (5,3), (5,6), (3,1)] ghci> [a + b | (a, b) <- xs] [4,7,6,8,11,4] ``` **Padrão comum:** Uma pattern como `x:xs` irá colocar a cabeça de uma lista em `x` o resto dela em `xs`, ainda que o único elemento em `xs` seja uma lista vazia. :::info O padrão x:xs é muito usado, principalmente em funções recursivas. O (possível) problema é de `:` funcionar apenas com lista de length 1 ou maior ::: Se quisermos deixar, digamos, os três primeiros elementos de uma lista numa variável e o resto em outra, podemos escrever algo como `x:y:z:zs`. Só funcionará com lista de 3 ou mais elementos. Segue-se a própria implementação da função `head`, com recurso a _pattern_ ```haskell head' :: [a] -> a head' [] = error "Proibido chamar head em uma lista vazia!" head' (x:_) = x ``` Um forma 'interessante' de mostros valores de uma lista: ```haskell tell :: (Show a) => [a] -> String tell [] = "A lista esta vazia" tell (x:[]) = "A lista tem apenas um elemento: " ++ show x tell (x:y:[]) = "A lista tem dois elementos: " ++ show x ++ " e " ++ show y tell (x:y:_) = "Esta lista esta longa demais. Veja os dois primeiros elementos: " ++ show x ++ " e " ++ show y ``` :::warning O `(x:[])` e `(x:y:[])` poderiam ser escritos como `[x]` e `[x,y]` (como é algo mais simples, despensa-se os parênteses). Ao contrário de `(x:y:_)`, que são para listas de mais de dois elementos e não podem ser escritos com `[]`. ::: Implementação da função `length` usando _pattern_: ```haskell lenght' :: (Num b) => [a] -> b lenght' [] = 0 lenght' xs = 1 + length' xs ``` :::info **Descrevendo a função:** Então vamos descobrir o que acontece ao chamar `length'` com `"ham"`. Primeiro, é testado se é uma lista vazia. Já que não é, passa-se para o segundo pattern. Aí passamos no teste e o resultado da `length é 1 + length'` "am", porque dividimos a lista em primeiro e resto e descartamos o primeiro elemento. ` length' de "am"` é, semelhantemente, `1 + length' "m"`. Então agora temos `1 + (1 + length' "m")`. `length' "m"` é `1 + length' ""`(que também poderia ser escrito como `1 + length' 1 []`). E já definimos que `length' []` é 0. Logo, no fim temos `1 + (1 + (1 + 0))`. ::: Implementação da função `sum` usando _pattern_: ```haskell sum' :: (Num a) => [a] -> a sum' [] = 0 sum' (x:xs) = x + sum' xs ``` Também existem os **as patterns**. São utilizados quando precisameos usar um _pattern_ e que queremos que ele continue acessível, mesmo depois de usado. Para isso utilizamos o `@` na frente do nome do _pattern_.Por exemplo, o pattern `xs@(x:y:ys)`.Esse as patterns irá fazer exatamente a mesma coisa que `x:y:ys`, mas você consegue obter a lista inteira usando apenas xs, ao invés repetir tudo novamente digitando `x:y:ys` no corpo da função novamente. ```haskell capital :: String -> String capital "" = "String vazia, oops!" capital all@(x:xs) = "A primeira letra de " ++ all ++ " é " ++ [x] ``` Resultado: ```haskell ghci> capital "Dracula" "A primeira letra de Dracula é D" ``` :::danger Em _pattern_ não se pode utilizar `++`. ::: --- ### Guarded equations Muito semelhantes ao `ifs`. A diferença é que guards são mais fáceis de ler quando têm muitas condições e funcionam bem com patterns. Exemplo utilizando _guards_: ```haskell bmiTell :: (RealFloat a) => a -> String bmiTell bmi | bmi <= 18.5 = "Você esta abaixo do peso!" | bmi <= 25.0 = "Supostamente você esta normal. Pfff, aposto que você é feio!" | bmi <= 30.0 = "Você esta gordo! Faça uma dieta, gorducho!" | otherwise = "Você é uma baleia, meus parabéns!" ``` Com recurso as estas formas, em especial ao `where`, chegamos a uma forma mais optimizada da mesma função: ```haskell bmiTell :: (RealFloat a) => a -> String bmiTell weight height | bmi <= skinny = "Esta abaixo do peso!" | bmi <= normal = "Supostamente esta normal. Pfff, aposto que é feio!" | bmi <= fat = "Esta gordo! Faça uma dieta, gorducho!" | otherwise = "É uma baleia, meus parabéns!" where bmi = weight / height ^ 2 skinny = 18.5 normal = 25.0 fat = 30.0 ``` :::info É de notar que em funções deste tipo, à semelhança de todas as outras já abordadas, pode receber mais de que um parâmetro. ::: **INFO:** _Guards_ são marcados por **_pipes_**, seguidos do nome de uma função e os seus parâmetros. Um _Guards_ geralmente é uma expressão booleana. :::spoiler **+info** _Haskell guards_ podem ser vistos com função matemática definida por partes sobre a entrada. ```haskell foo x | x < 0 = bar | x < 5 = baz | x < 20 = quux | otherwise = quaffle ```` Em matemática seria escrita desta forma: ``` foo(x) = { bar, if x < 0 baz, if x >= 0 && x < 5 quux, if x >= 5 && x < 20 quaffle, if x >= 20 ``` Cada um dos _guards_ numa função Haskell carrega implicitamente a negação de todos os _guards_ que a precedem, porque eles são 'julgados' um após o outro. Haskell decide escrever a _guards_ à esquerda do sinal de igual para facilitar o acompanhamento do fluxo de controle. Se você optar por ler o `|` como 'tal que', então torna se bastante intuitivo. Em vários casos, o último *guard* é `otherwise`.`otherwise` é definido com `otherwise = True` e aprova tudo. É muito parecido com patterns, que testam por padrões ao invés de condições booleanas. Se todos os guards de uma função derem `False` (e não tivermos especificado um _guard_`otherwise`), é testado o próximo pattern. É assim que _patterns_ e _guards_ funcionam bem em conjunto. Se nenhum guard ou pattern se aplicar, é lançado um erro. ::: ### Empressão `Where` Os nomes criados na seção `where` só são visíveis dentro da função, então não temos de nos preocupar com elas poluindo o namespace de outras funções. Note também que todos os nomes foram alinhados na mesma coluna. Se não o fizéssemos, _Haskell_ ficaria confuso e não saberia que eles fazem parte do mesmo bloco. Também podemos usar `where` em conjunto com _pattern match_! Poderíamos reescrever a parte `where` da nossa função anterior como: ```haskell ... where bmi = weight / height ^ 2 (skinny, normal, fat) = (18.5, 25.0, 30.0) ``` Assim como definimos constantes em blocos where,também podemos definir funções. Voltando ao tema da função anterior, vamos fazer uma função que pega uma lista de pesos/altura e retorna sua lista de IMC: ```haskell calcBmis :: (RealFloat a) => [(a, a)] -> [a] calcBmis xs = [bmi w h | (w, h) <- xs] where bmi weight height = weight / height ^ 2 ``` ### Deixe estar (Expressão `let`) ==COMPLETAR QUANDO FOR DADO== ### Expressão `case` ==COMPLETAR QUANDO FOR DADO== ## Funções de Ordem superior ### Funções curried Toda e qualquer função em Haskell recebe apenas um parametro, ou seja, todas as funções que recebem mais do que um parametro sao _funções curried_. Exemplo com a função `max`: Executar `max 4 5` cria primeiro uma função que recebe um parâmetro e retorna ou **4** ou este parâmetro, dependendo de qual é o maior. Então, **5** é aplicado à esta função e ela produz o resultado desejado. ```haskell ghci> max 4 5 5 ghci> (max 4) 5 5 ``` Colocar um espaço entre duas coisa é simplesmente **aplicar a função**. Tipo de `max`: ```haskell max :: (Ord a) => a -> a -> a ou max :: (Ord a) => a -> (a -> a) ``` Isso poderia ser lido assim: max recece um a e retorna (com aquele `->`) uma função que recebe um a e retorna um a. ```haskell ``` ## ## Anexos ### A1. Operadores/Funções ==`elem`== --> verificar se um determina elemente se encontra dentro de um lista ==`n mod p`== --> resto da divisão de n por p ==`map`== -> recebe uma função e uma lista e aplica esta função em todos elementos da lista, produzindo uma nova lista. Vamos ver como é a sua declaração de tipo e como ele é definido. ```haskell map :: (a -> b) -> [a] -> [b] map _ [] = [] map f (x:xs) = f x : map f xs ``` Exemplo em funcionamento: ```haskell ghci> map (+3) [1,5,3,1,6] [4,8,6,4,9] ``` No exemplo anterior pode ser ser utilixzado uma compreensão de lista: `[x+3 | x <- [1,5,3,1,6]]`. Apenas utilizamos o `map` por ser mais legível, não criando tanta confusão na escrita do código. ==`filter`== -> é uma função que recebe um predicado e uma lista. Retorna uma lista com elementos que satisfazem o predicado. A declaração de tipo e a implementação é algo como: ```haskell filter :: (a -> Bool) -> [a] -> [a] filter _ [] = [] filter p (x:xs) | p x = x : filter p xs | otherwise = filter p xs ``` Em funcionamento: ```haskell ghci> filter (>3) [1,5,3,2,1,6,4,3,2,1] [5,6,4] ``` :::info Um predicado é uma função que diz que qualquer coisa é verdadeira ou não, nesse caso, uma função que retorna um valor booleano. ::: ==`takeWhile`== -> recebe um predicado e uma lista. De seguida, vai ao inicio da lista e retorna os elementos que satisfazem o predicado. Se o elemento encontrado pela função não satisfazer o predicado, ela para. Exemplom se quisessemos a primeira palavra da _String_ `"elefantes é que sabem fazer festa"`, então fariamos algo assim: `takeWhile (/=' ') "elefantes é que sabem fazer festa"`, que retornaria apenas `elefantes` ### A2. Tipos de funções __Funções Polimorfica__: uma função é chamada de polimórfica se o seu tipo conter um ou mais tipo de variáveis. E.g: ```haskell length :: [ a ] -> Int ``` __Funções Overloaded__: Uma função polimórfica é chamada _overloaded_ se o seu tipo conter um ou mais classe de restriçao. E.g.: ```haskell (+) :: Num a = > a -> a -> a ``` :::spoiler - [x] **Bold** - [ ] *Italic* - [ ] Super^script^ - [ ] Sub~script~ - [ ] ~~Crossed~~ - [x] ==Highlight== :bulb: **Hint:** You can also apply styling from the toolbar at the top :arrow_upper_left: of the editing area. ![](https://i.imgur.com/Cnle9f9.png) > Drag-n-drop image from your file system to the editor to paste it! ### Step 3: Invite your team to collaborate! Click on the <i class="fa fa-share-alt"></i> **Sharing** menu :arrow_upper_right: and invite your team to collaborate on this note! ![permalink setting demo](https://i.imgur.com/PjUhQBB.gif) - [ ] Register and sign-in to HackMD (to use advanced features :tada: ) - [ ] Set Permalink for this note - [ ] Copy and share the link with your team :pushpin: Want to learn more? ➜ [HackMD Tutorials](https://hackmd.io/c/tutorials) --- ## BONUS: More cool ways to HackMD! - Table | Features | Tutorials | | ----------------- |:----------------------- | | GitHub Sync | [:link:][GitHub-Sync] | | Browser Extension | [:link:][HackMD-it] | | Book Mode | [:link:][Book-mode] | | Slide Mode | [:link:][Slide-mode] | | Share & Publish | [:link:][Share-Publish] | [GitHub-Sync]: https://hackmd.io/c/tutorials/%2Fs%2Flink-with-github [HackMD-it]: https://hackmd.io/c/tutorials/%2Fs%2Fhackmd-it [Book-mode]: https://hackmd.io/c/tutorials/%2Fs%2Fhow-to-create-book [Slide-mode]: https://hackmd.io/c/tutorials/%2Fs%2Fhow-to-create-slide-deck [Share-Publish]: https://hackmd.io/c/tutorials/%2Fs%2Fhow-to-publish-note - LaTeX for formulas $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$ - Code block with color and line numbers: ```javascript=16 var s = "JavaScript syntax highlighting"; alert(s); ``` - UML diagrams ```sequence Alice->Bob: Hello Bob, how are you? Note right of Bob: Bob thinks Bob-->Alice: I am good thanks! Note left of Alice: Alice responds Alice->Bob: Where have you been? ``` - Auto-generated Table of Content [ToC] > Leave in-line comments! [color=#3b75c6] - Embed YouTube Videos {%youtube PJuNmlE74BQ %} > Put your cursor right behind an empty bracket {} :arrow_left: and see all your choices. - And MORE ➜ [HackMD Tutorials](https://hackmd.io/c/tutorials) :::

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully