  The open heavy-flavour hadron measurements in proton--proton and proton--lead
collisions give insight into the charm production and hadronization mechanisms.
In this contribution, the latest measurements of the production cross section
of prompt $\Lambda^+_{\rm c}$ and its charge conjugate performed with the ALICE
detector at midrapidity in pp, and the new measurement of $\Lambda_\mathrm{c}^+
\to \mathrm{p} \mathrm{K}_\mathrm{S}^0$ performed down to $p_{\rm T}=0$ in
p--Pb collisions at $\sqrt{s_{\rm NN}}$ = 5.02 TeV are presented. We also
present the first ALICE measurement of the baryon-to-meson ratio
$\Lambda^+_{\rm c}/{\rm D^0}$ and the $\Lambda^+_{\rm c}$ nuclear modification
factor $R_{\rm pPb}$ down to $p_{\rm T}$ = 0 in p--Pb collisions. The
$\Lambda^+_{\rm c}/{\rm D^0}$ ratio at midrapidity at the LHC is significantly
higher than the one in ${\rm e^+e^-}$ collisions, suggesting that the
fragmentation of charm is not universal across different collision systems. The
results are compared with theoretical calculations.
